A
Amanda
I write an application using VB6. With Word 2003, I
cannot identify the datasource used when creating the
original mail merge document. (The original document can
have a datasource named anything under the sun. I do not
control the naming from the VB app.) With Word 97, 2000,
and 2002, I can get this information. With Word 2003, it
comes out empty. Here's an example of basic code to
reproduce this. Is there a different way of doing this?
(Alas, I need to control the merge from VB, NOT from Word
for my purposes, and I have no way of guaranteeing what
the datasource is named, so I need to be able to retrieve
it from the document.)
'dim variable here
Set WdDoc = WdApp.Documents.Open
("C:\somedirectory\Test1.doc")
SourceName = WdDoc.MailMerge.DataSource.Name
Note that the document referenced was created in MSWord
2003 using the "Type New List' option, selecting
the 'customize' option and creating a few of my own field
names. (F_AddressName, for example).
Thanks for any input!
A.
cannot identify the datasource used when creating the
original mail merge document. (The original document can
have a datasource named anything under the sun. I do not
control the naming from the VB app.) With Word 97, 2000,
and 2002, I can get this information. With Word 2003, it
comes out empty. Here's an example of basic code to
reproduce this. Is there a different way of doing this?
(Alas, I need to control the merge from VB, NOT from Word
for my purposes, and I have no way of guaranteeing what
the datasource is named, so I need to be able to retrieve
it from the document.)
'dim variable here
Set WdDoc = WdApp.Documents.Open
("C:\somedirectory\Test1.doc")
SourceName = WdDoc.MailMerge.DataSource.Name
Note that the document referenced was created in MSWord
2003 using the "Type New List' option, selecting
the 'customize' option and creating a few of my own field
names. (F_AddressName, for example).
Thanks for any input!
A.