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
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