Solved

Word 2007 Mail Merge using SQL query rather than whole table

Posted on 2007-03-22
2
1,444 Views
Last Modified: 2008-01-09
I want to merge data from an address table in an SQL2000 database into a word document.  I'm using Word 2007 and I can only seem to be able to load an entire table.  I'd like to be able to specify the data I want using a SQL query.  I had tried using MS Query via Excel and saving a .dqy file to use in Word, but have had weird results.  Some data fields for nvarchar data types are blank.

0
Comment
Question by:neburton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 70

Accepted Solution

by:
KCTS earned 250 total points
ID: 18773279
You could create a view in SQL and use the view rather than the table.
0
 
LVL 1

Author Comment

by:neburton
ID: 18778211
I guessed that since posting the question and it works, but was wondering if there was a more elegant and flexible solution.  I'd like to be able modify the query on a regular basis, and it would be nice to do this in word rather than firing up SQL Enterprise Manager to modify a View.  Seems Microsoft missed a trick here with Word 2007.
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you work with Word a lot, you probably use styles. If you use styles a lot, you've probably balled your fist more often than not when working with the ribbon. In Word 2007/2010, one of the things that I find missing when using styles is a quic…
A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question