Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Epoh Rio Epoh Rio is offline
external usenet poster
 
Posts: 1
Default Edit SQL String in Mail Merge

How can I edit the SQL string "SELECT * ..." to filter recipients in a
mail merge
using Excel as the Data Source.

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Edit SQL String in Mail Merge

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
"Epoh Rio" wrote in message
ups.com...
How can I edit the SQL string "SELECT * ..." to filter recipients in a
mail merge
using Excel as the Data Source.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
edit mail merge recipeints charlie Mailmerge 1 July 13th 06 09:27 AM
In a mail merge in Word , How can I edit a data source if the edi. Mail merge help Mailmerge 1 March 10th 06 07:55 AM
how to edit mail merge after its saved in word 2000 mamabren Mailmerge 1 February 14th 06 08:02 PM
I can't edit mail merge recipients - edit is "greyed out" Janelle Mailmerge 1 July 6th 05 09:12 AM
Mail Merge - Parameter prompts twice... TL Mailmerge 6 June 17th 05 02:58 PM


All times are GMT +1. The time now is 10:19 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"