I
Ian McLeish
I have been trying to open publisher using microsoft word, to open a
mailmerge document, show the details, and then print it out. I can get
Publisher to open, but I cannot work out how toggle the mailmerge fields- to
show the details rather than the mailmerge field codes. Also, I can get the
printer to print using this macro, but I obviously have the wrong code,
because all it does is dump a single blank page.
It is a long winded reason why I want to control Publisher from word, but
basically I need to kick things off in a Document Template. Perhaps it would
be better to use a macro in Publisher, but then how would I call a macro in
Pub from word? Below is the code I have been unsuccessfully trying.
Thanks in advance for any suggestions,
Ian
Sub OpenNewPub()
Dim appPub As New Publisher.Application
appPub.Open FileName:="c:\documents and settings\Ian McLeish\My
Documents\TestRecord Card2000 4th Attempt.pub", _
ReadOnly:=True, AddToRecentFiles:=False, _
SaveChanges:=pbPromptToSaveChanges
appPub.ActiveWindow.Visible = True
'ActiveDocument.MailMerge.ViewMailMergeFieldCodes = False
ThisDocument.PrintOut
End Sub
mailmerge document, show the details, and then print it out. I can get
Publisher to open, but I cannot work out how toggle the mailmerge fields- to
show the details rather than the mailmerge field codes. Also, I can get the
printer to print using this macro, but I obviously have the wrong code,
because all it does is dump a single blank page.
It is a long winded reason why I want to control Publisher from word, but
basically I need to kick things off in a Document Template. Perhaps it would
be better to use a macro in Publisher, but then how would I call a macro in
Pub from word? Below is the code I have been unsuccessfully trying.
Thanks in advance for any suggestions,
Ian
Sub OpenNewPub()
Dim appPub As New Publisher.Application
appPub.Open FileName:="c:\documents and settings\Ian McLeish\My
Documents\TestRecord Card2000 4th Attempt.pub", _
ReadOnly:=True, AddToRecentFiles:=False, _
SaveChanges:=pbPromptToSaveChanges
appPub.ActiveWindow.Visible = True
'ActiveDocument.MailMerge.ViewMailMergeFieldCodes = False
ThisDocument.PrintOut
End Sub