Word automation problem

P

Phill

I am trying to do a mail merge using a stored template (.dot) file. The
problem is that I get two Word documents open, the template and the merge
document. How do I set it up so that I don't get the template document?
This is my code:
Set WordApp = CreateObject("Word.Application")

Set WordDoc = WordApp.Documents.Add(Template:= _
Path & WordTemplate, _
NewTemplate:=False)
 
A

Albert D. Kallal

I have a working word merge example. I unfortunately did not use the .dot
for my templates.

However, my code does correct handle the merge, and templates.And, further,
the resulting document has no merge codes, or no connections, so you can
email it etc. to other people.

Give the sample a try here:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

The above should work for you...
 

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