Automating Mail Merge to New Document

A

Andrew Duncan

Hi, I'm using Word 2000/XP/2003 on various computers. I
would like to modify my existing mail merge documents so
that when they are opened they automatically perform
a "merge to new document" and close the original
document, keeping the "merged to new document" open. Does
anyone know if this is possible?

Kind regards,
Andrew
 
C

Cindy M -WordMVP-

Hi Andrew,
I'm using Word 2000/XP/2003 on various computers. I
would like to modify my existing mail merge documents so
that when they are opened they automatically perform
a "merge to new document" and close the original
document, keeping the "merged to new document" open. Does
anyone know if this is possible?
It should be possible using a macro named AutoOpen. It would
look more or less like this:

Sub AutoOpen()
Dim doc as Word.Document

Set doc = ActiveDocument
doc.MailMerge.Execute
doc.Close wdDoNotSaveChanges
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

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

Peter Pan

Hi Andrew,

It should be possible using a macro named AutoOpen. It would
look more or less like this:

Sub AutoOpen()
Dim doc as Word.Document

Set doc = ActiveDocument
doc.MailMerge.Execute
doc.Close wdDoNotSaveChanges
End Sub
Hi Cindy,

Thanks, that appears to work great. I've just added this and now wondering
how to open up a mail merge document as normal now, as everytime I go to
open it it does the mail merge so I can't edit the original document.

Many thanks,
Andrew
 
P

Peter Jamieson

You can prevent "Auto" macros from executing by holding down the shift key
when you open the document/template.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top