mailmerge execute

J

Jonathan

Hi using Word 2003.

Maybe there is a better way to do this. Please let me know how to do it if
there is.

I have set up a template that has an Excel workbook as its data source. I
would now like to automate merging data to a new document.

With wdApp
Set wordTemplate = .Documents.Open(letterTemplate)
wordTemplate.mailmerge.Execute (True)
Set wordDocument = .ActiveDocument
...
End With

The line where the template is opened triggers the following message.
'Opening this document will run the following SQL command... Data from your
database will be placed in the document. Do you want to continue?'

How do I set up my template so that the data is updated without the need for
this message?

Many thanks,
Jonathan
 
D

Doug Robbins - Word MVP

See the following Knowledge Base article:

"Opening This Will Run the Following SQL Command" Message When You Open a
Word Document - 825765 at:

http://support.microsoft.com?kbid=825765


--
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, originally posted via msnews.microsoft.com
 
D

Doug Robbins - Word MVP

Yes, if you do not want to implement the work around, that is what you will
have to do.

--
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, originally posted via msnews.microsoft.com
 

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