C
Craig
The below code has worked for many years until my client got a new machine.:
Dim myWord As Word.Application
Dim myDoc As Word.Document
Dim sFileName As String
Dim sPath As String
sPath = CurrentProject.Path
sFileName = "\ThankYou.doc"
sFileName = sPath & sFileName
Set myWord = New Word.Application
Set myDoc = New Word.Document
myWord.Visible = True
Set myDoc = myWord.Documents.Open(sFileName)
With myDoc.MailMerge
.Destination = wdSendToNewDocument
.Execute
End With
myDoc.Close
All of the code references for Word 11.0 are checked. I now get the error
message "Requested Object is not available."
Any help appreciated
Dim myWord As Word.Application
Dim myDoc As Word.Document
Dim sFileName As String
Dim sPath As String
sPath = CurrentProject.Path
sFileName = "\ThankYou.doc"
sFileName = sPath & sFileName
Set myWord = New Word.Application
Set myDoc = New Word.Document
myWord.Visible = True
Set myDoc = myWord.Documents.Open(sFileName)
With myDoc.MailMerge
.Destination = wdSendToNewDocument
.Execute
End With
myDoc.Close
All of the code references for Word 11.0 are checked. I now get the error
message "Requested Object is not available."
Any help appreciated