#1   Report Post  
Posted to microsoft.public.word.docmanagement
Michelle
 
Posts: n/a
Default Macro after merge

Does anyone know a way to make a macro automatically run after a merge is
complete?

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default Macro after merge

Hi ?B?TWljaGVsbGU=?=,

Does anyone know a way to make a macro automatically run after a merge is
complete?

Depends on the version of Word in question.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Michelle
 
Posts: n/a
Default Macro after merge

I'd like to be able to use it for 2000 and 2003.

"Cindy M -WordMVP-" wrote:

Hi ?B?TWljaGVsbGU=?=,

Does anyone know a way to make a macro automatically run after a merge is
complete?

Depends on the version of Word in question.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default Macro after merge

Hi Michelle,

I'd like to be able to use it for 2000 and 2003.

Sorry for the late reply, I was away...

With Word 2000 in the equation you have only one possibility:

Set up the macro to execute the merge, then the code you want to have run after
the merge is completed should immediately follow that. Word won't try to run
that code until the merge execution has been completed. Very roughly, like this:

Set doc = ActiveDocument
doc.MailMerge.Execute
doc.close wdDoNotSaveChanges
'The active document should now be the result
'It's probably the result, even if you don't close
'the main merge doc...


Does anyone know a way to make a macro automatically run after a merge is
complete?



Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Michelle
 
Posts: n/a
Default Macro after merge

Thanks anyway for responding. However, the merge is started from a database
program, so the macro has to run after.

"Cindy M -WordMVP-" wrote:

Hi Michelle,

I'd like to be able to use it for 2000 and 2003.

Sorry for the late reply, I was away...

With Word 2000 in the equation you have only one possibility:

Set up the macro to execute the merge, then the code you want to have run after
the merge is completed should immediately follow that. Word won't try to run
that code until the merge execution has been completed. Very roughly, like this:

Set doc = ActiveDocument
doc.MailMerge.Execute
doc.close wdDoNotSaveChanges
'The active document should now be the result
'It's probably the result, even if you don't close
'the main merge doc...


Does anyone know a way to make a macro automatically run after a merge is
complete?



Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)




  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default Macro after merge

Hi ?B?TWljaGVsbGU=?=,

However, the merge is started from a database
program, so the macro has to run after.

That shouldn't matter. The code in the database will also
pause until the merge has completed. Mail merge is not
asynchronous.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)

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
using a macro to help non IT users do a merge DebLT Mailmerge 0 October 28th 05 10:33 PM
Mail Merge Macro Know your Word... Mailmerge 1 June 17th 05 10:43 AM
create a macro in a merge document field wilddove Mailmerge 3 June 15th 05 11:14 AM
mail merge with attachments AS Mailmerge 5 April 9th 05 09:49 AM
Macro to Print and Exit after Merge Karen Hart Mailmerge 2 February 11th 05 09:10 PM


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