Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Rich W. Rich W. is offline
external usenet poster
 
Posts: 7
Default SQL statement in mail merge document

When I bring up a mail merge doc (mm), I can view the SQL statement. Then I
dismiss the dialog box and continue.

But, later, how can I re-view the sql statement? (Currently, I open the
docuiment in "Recover Text" mode - that's an ugly way to do it.)

Thanks for any info . . .

Rich
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default SQL statement in mail merge document

There isn't a really simple way (except perhaps close the document and
re-open it so you see the message again).

If you start the Word VB editor you can see any SQL by entering the
following in the immediate panel:

print activedocument.mailmerge.datasource.querystring

(You can show the immediate panel using ctrl-G once you are in the VB
Editor).


--
Peter Jamieson
http://tips.pjmsn.me.uk

"Rich W." wrote in message
news
When I bring up a mail merge doc (mm), I can view the SQL statement. Then
I
dismiss the dialog box and continue.

But, later, how can I re-view the sql statement? (Currently, I open the
docuiment in "Recover Text" mode - that's an ugly way to do it.)

Thanks for any info . . .

Rich


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Mrs Dumm Mrs Dumm is offline
external usenet poster
 
Posts: 5
Default SQL statement in mail merge document

Rich,
On a related note, if you want to CHANGE the SQL statement that is currently
attached to the merge form, you can use the "Open Data Source" button on the
Mail Merge toolbar and that seems to remove any previous filtering that was
in place. I can then refilter it as I choose using the "MailMerge
Recipients" button. I find if I open the "MailMerge Recipients" dialog, I
can't go "back" in the filtering that is already in place (that SQL
statement).

Alicia

"Peter Jamieson" wrote:

There isn't a really simple way (except perhaps close the document and
re-open it so you see the message again).

If you start the Word VB editor you can see any SQL by entering the
following in the immediate panel:

print activedocument.mailmerge.datasource.querystring

(You can show the immediate panel using ctrl-G once you are in the VB
Editor).


--
Peter Jamieson
http://tips.pjmsn.me.uk

"Rich W." wrote in message
news
When I bring up a mail merge doc (mm), I can view the SQL statement. Then
I
dismiss the dialog box and continue.

But, later, how can I re-view the sql statement? (Currently, I open the
docuiment in "Recover Text" mode - that's an ugly way to do it.)

Thanks for any info . . .

Rich



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Rich W. Rich W. is offline
external usenet poster
 
Posts: 7
Default SQL statement in mail merge document


Thank you very much; the vba code is a good idea.

Rich


"Peter Jamieson" wrote:

There isn't a really simple way (except perhaps close the document and
re-open it so you see the message again).

If you start the Word VB editor you can see any SQL by entering the
following in the immediate panel:

print activedocument.mailmerge.datasource.querystring

(You can show the immediate panel using ctrl-G once you are in the VB
Editor).


--
Peter Jamieson
http://tips.pjmsn.me.uk

"Rich W." wrote in message
news
When I bring up a mail merge doc (mm), I can view the SQL statement. Then
I
dismiss the dialog box and continue.

But, later, how can I re-view the sql statement? (Currently, I open the
docuiment in "Recover Text" mode - that's an ugly way to do it.)

Thanks for any info . . .

Rich



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
Mail Merge - If statement Nieve Mailmerge 21 December 22nd 08 11:38 PM
mail merge if statement kyle''s Mailmerge 5 October 10th 07 09:05 AM
mail merge IF statement question donna Mailmerge 1 December 5th 06 10:39 PM
mail merge and sql statement Marty Mailmerge 1 April 12th 06 07:54 PM
Mail Merge - Next Record If Statement HiramPat Mailmerge 5 April 22nd 05 04:03 PM


All times are GMT +1. The time now is 09:46 AM.

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"