T
TedMi
I create a mail-merge doc and attach a data source (query in Access db). When
opened manually, everything works fine -
ActiveDocument.MailMerge.State is 2 (MainandDataSource),
ActiveDocument.Mailmerge.DataSource.Name returns the proper string.
However, when I open with automation:
Set appWord = CreateObject("Word.Application")
appWord.Documents.Open "MyMerge.doc"
I get appWord.ActiveDocument.MailMerge.State is 0 (Normal doc),
ActiveDocument.Mailmerge.DataSource.Name is empty.
I can set the datasource in code, but why doesn't the one applied externally
stick? Is there some magic incantation of the Open method that I'm missing?
Thanks.
opened manually, everything works fine -
ActiveDocument.MailMerge.State is 2 (MainandDataSource),
ActiveDocument.Mailmerge.DataSource.Name returns the proper string.
However, when I open with automation:
Set appWord = CreateObject("Word.Application")
appWord.Documents.Open "MyMerge.doc"
I get appWord.ActiveDocument.MailMerge.State is 0 (Normal doc),
ActiveDocument.Mailmerge.DataSource.Name is empty.
I can set the datasource in code, but why doesn't the one applied externally
stick? Is there some magic incantation of the Open method that I'm missing?
Thanks.