Creosote65
Technical User
Hi all,
About six months ago, I created a function in Access 2002 that would perform a mail merge based on a template file in Word. The mail merge portion goes as follows:
With docWord.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
End With
It has worked without a hitch for the last six months. Yesterday, a new employee started, and the IT guys set her up with a computer built from a ghost file. Now, vba is saying that the ".Destination = wdSendToNewDocument" line generates a "runtime error 5852" message stating that the requested object is not available.
So my question is in two parts:
1- How do I fix this so that my line works and the mail merge completes?
2- Why does the current syntax work with everyone except the new employee? All software versions are the same.
Any help would be greatly appreciated.
Creosote
About six months ago, I created a function in Access 2002 that would perform a mail merge based on a template file in Word. The mail merge portion goes as follows:
With docWord.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
End With
It has worked without a hitch for the last six months. Yesterday, a new employee started, and the IT guys set her up with a computer built from a ghost file. Now, vba is saying that the ".Destination = wdSendToNewDocument" line generates a "runtime error 5852" message stating that the requested object is not available.
So my question is in two parts:
1- How do I fix this so that my line works and the mail merge completes?
2- Why does the current syntax work with everyone except the new employee? All software versions are the same.
Any help would be greatly appreciated.
Creosote