girls3dog1
Programmer
I have a word template file with a datasource defined with it. I open the file in VBA with ...Document.Open("filename") and the file opens with out the datasource. Is there a way to have the template file open with datasource attached?
Here's snippet of my code:
//Open document and merge new data and save
ls_document_name = "c:\database\test3.doc"
ole_Word.Documents.Open(ls_document_name)
ole_Word.ActiveDocument.MailMerge
ole_Word.ActiveDocument.MailMerge.Destination=1
ole_Word.ActiveDocument.MailMerge.Execute(False)
Here's snippet of my code:
//Open document and merge new data and save
ls_document_name = "c:\database\test3.doc"
ole_Word.Documents.Open(ls_document_name)
ole_Word.ActiveDocument.MailMerge
ole_Word.ActiveDocument.MailMerge.Destination=1
ole_Word.ActiveDocument.MailMerge.Execute(False)