Solved

Word 2007 Mail Merge using SQL query rather than whole table

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

910 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

19 Experts available now in Live!

Get 1:1 Help Now