Solved

Word 2007 Mail Merge using SQL query rather than whole table

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Introduction Authors who set out to write any sort of lengthy piece for online submission—be it a long question or comment on a technical form, an article, or a substantial blog entry—often find it useful to work up a draft in an editor other t…
This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.

821 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