Solved

Word 2007 Mail Merge using SQL query rather than whole table

Posted on 2007-03-22
2
1,431 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
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
Microsoft Word is a program we have all encountered at some point, but very few of us have dug deep into its full scope of features, let alone customized it to suit our needs. Luckily making the ribbon (aka toolbar, first introduced in Word 2007) wo…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now