Making a Word mailmerge template merge when it opens.

D

Dixie

I have a lot of mailmerge templates which merge to data in a small tab
delimited text file on the local drive. When these documents open, I seem
to have to click a button to make them merge with the data in the file.

Is there some simple code I can add to the documents that will make them
merge automatically without the button press?

dixie
 
D

Dixie

By that, I mean that when I open the document, I want it to look like it
does when you click the <<ABC>> View merged data button and the fields are
filled with the merged data.

Surely there is some simple code that can be put into the document to make
the merge happen automatically?

dixie
 
D

Doug Robbins - Word MVP

Using the following code in an autonew macro in the template will cause the
merge to be executed to a new document

With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.Execute
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
D

Dixie

I'm not used to programming Word. How do I create an autonew macro and when
does it run?

dixie
 
Top