Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / December 2006

Tip: Looking for answers? Try searching our database.

Edit SQL String in Mail Merge

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Epoh Rio - 07 Dec 2006 20:35 GMT
How can I edit the SQL string "SELECT * ..." to filter recipients in a
mail merge
using Excel as the Data Source.
Peter Jamieson - 07 Dec 2006 22:42 GMT
You can't do it directly in the Word user interface - you need to use Word
VBA either to set the value of
ActiveDocument.MailMerge.DataSource.QueryString to the SQL you want, or
(more reliable) use the VBA OpenDataSource method to re-open the data source
with the appropriate filename, connection string and SQL. Precisely how to
do that depends on the version of Word and the connection method you need to
use but you will find plenty of examples by search this group in Google
Groups (e.g. look for Peter Jamieson Excel opendatasource)

Peter Jamieson
> How can I edit the SQL string "SELECT * ..." to filter recipients in a
> mail merge
> using Excel as the Data Source.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.