ActiveDocument.mailmerge syntax not working

D

Don

Hello, I'm using this code below from within Access to open a Word document.
It works fine on my machine but I have a user that gets an error when trying
to run the mailmerge.execute line. Any thought why?

Thanks

Don

Dim objApp As Object
Dim strDocName As String
Dim strDocNameB As String
'strDocName = rs!ClosingDir & "\MasterTest.doc"
strDocName = rs!ClosingDir & "\" & rs!ClosingDoc
Set objApp = CreateObject("Word.application")
With objApp
.Visible = True
.Documents.Open strDocName
strDocNameB = objApp.ActiveDocument.Name
***Lines Below sometimes don't work on other machines.
.ActiveDocument.mailmerge.Destination =0 'wdSendToNewDocument
.ActiveDocument.mailmerge.Execute
.Documents(strDocNameB).Close 0
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top