H
hummingbird
Need to remote control Word 2003 from VB6 app. I use the following steps
Public appWord As Word.Applicatio
Public appWordDoc As Word.Documen
Set appWord = New Word.Applicatio
appWord.Visible = Tru
Set appWordDoc = appWord.Documents.Open("c:\Temp.doc")
Then if I try to read
appWordDoc.MailMerge.DataSource.QueryString
it says the object is not available
The document is a merge doc connected to a query in access. If I open it maunally with word, it ask me if I want to open the database with the doc, if I say yes, all is good
When I try the code above, it appears that the doc is opening without the database. The propert
appworddoc.MailMerge.MainDocumentType comes back as not a merge doc.
How do I open the doc thru code and make it open the data with it
Public appWord As Word.Applicatio
Public appWordDoc As Word.Documen
Set appWord = New Word.Applicatio
appWord.Visible = Tru
Set appWordDoc = appWord.Documents.Open("c:\Temp.doc")
Then if I try to read
appWordDoc.MailMerge.DataSource.QueryString
it says the object is not available
The document is a merge doc connected to a query in access. If I open it maunally with word, it ask me if I want to open the database with the doc, if I say yes, all is good
When I try the code above, it appears that the doc is opening without the database. The propert
appworddoc.MailMerge.MainDocumentType comes back as not a merge doc.
How do I open the doc thru code and make it open the data with it