Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Don
 
Posts: n/a
Default .ActiveDocument.mailmerge Syntax sometimes not working

Hello, I'm using this code below from with 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?

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
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
delete not working steve Microsoft Word Help 2 October 11th 07 10:03 PM
Working with large Word documents with embedded Excel diagrams carlos de Noruega Microsoft Word Help 3 October 19th 05 12:10 PM
CPU Usage When working with a Template I Created KM1 Microsoft Word Help 6 May 24th 05 04:38 PM
CPU Usage When Working with Templates you created KM1 Microsoft Word Help 3 May 21st 05 11:57 PM
Syntax for Number format in the Text Form Field Options Ed Hall 61 Microsoft Word Help 3 May 8th 05 07:51 PM


All times are GMT +1. The time now is 09:34 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"