Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Yes, the change to "not a merge document" really needs to be a one-off
action which yu now know how to do. After that, the name of the game is that
you either prevent the user from saving the mail merge main document after
the merge, or, since you are automating the merge, you should be able to put
the statement after the Mailmerge.Execute. But you need to use the right
document object variable to do that, and immediately after the merge
executes the ActiveDocument is the /new/ document, so you need to use

objWord.MailMerge.MainDocumentType = wdNotAMergeDocument

(I think you were using objWord to refer to the Mail Merge Main Document in
your code?)

Another possibility is to put

Activedocument.MailMerge.MainDocumentType = wdNotAMergeDocument

in an AutoClose macro (i.e. create a module in the document, create a sub
called AutoClose(), and put the appropriate statement in there), but I would
avoid that if possible.

Peter Jamieson


"TL" wrote in message
...
Thank you so much for your help! The prompt issue is related to the
document
already being linked to the datasource. I am encountering a small
problem,
though. I have tried using the code:

Activedocument.MailMerge.MainDocumentType = wdNotAMergeDocument

to fix this, but I am apparently not putting in the right place in my
code.
I have been getting various errors depending on where I place it. So, I
went
straight to the document and changed it with the setting "Normal Word
Document and saved it. This only works the first time the merge is
executed.
When you click the Merge button again the prompt for the RecordID comes up
again. I am assuming, (and I never really like to do that), that this is
because when the Mail Merge is Executed the document is changed to a Mail
Merge Document during the Execute of the first Mail Merge - hence the need
for the above code. So, my question is: Where exactly do I need to place
the above code in order for the document to be returned to a normal
document?
I have tried several places with no luck.

Tiffany




 
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 Word 2003 Issue S.Nicks Mailmerge 5 February 20th 09 01:55 AM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
Problem with automating mail merge HeatherO Mailmerge 2 March 29th 05 10:11 PM
Mail Merge Issue With Office 97 - Excel Data Source Matt Thorley Mailmerge 1 February 15th 05 11:38 PM
Word-Excel 2003 - Mail Merge Recipients problem AYager Mailmerge 2 January 11th 05 04:11 AM


All times are GMT +1. The time now is 10:45 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"