J
Joanne
When setting the Destination property of a MailMerge
object from Access 2003 I get the error
message "Requested Object is not Available". I am using
Word 2003 and the data source (a text file) is already
linked to the Word document. VBA is just doing the mail
merge. The code below works fine in Office 2002.
Any suggestions?
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Dim wrdMailMerge As Word.MailMerge
Set wrdApp = CreateObject("Word.Application")
Set wrdDoc = wrdApp.Documents.Open("C:\TIN.DOC")
Set wrdMailMerge = wrdDoc.MailMerge
wrdMailMerge.Destination = wdSendToPrinter
wrdMailMerge.Execute False
wrdDoc.Close False
Set wrdMailMerge = Nothing
Set wrdDoc = Nothing
Set wrdApp = Nothing
object from Access 2003 I get the error
message "Requested Object is not Available". I am using
Word 2003 and the data source (a text file) is already
linked to the Word document. VBA is just doing the mail
merge. The code below works fine in Office 2002.
Any suggestions?
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
Dim wrdMailMerge As Word.MailMerge
Set wrdApp = CreateObject("Word.Application")
Set wrdDoc = wrdApp.Documents.Open("C:\TIN.DOC")
Set wrdMailMerge = wrdDoc.MailMerge
wrdMailMerge.Destination = wdSendToPrinter
wrdMailMerge.Execute False
wrdDoc.Close False
Set wrdMailMerge = Nothing
Set wrdDoc = Nothing
Set wrdApp = Nothing