G
gary via OfficeKB.com
I'm using vba to automate a catalog merge code works fine for Word 2002 sp2,
but when I try it on Word 2002 sp3 the catalog merge does page breaks for
eachj section instead of all on one page.
Set WrdDoc = appWord.Documents.Open(FileName:="\\em\office\Admissions\Events\
visits\itinerary.doc", Visible:=True)
WrdDoc.MailMerge.OpenDataSource Name:= _
"\\em\office\Admissions\Events\visits\itinerary.xls", _
ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="",
_
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False,
_
Format:=wdOpenFormatAuto, Connection:="", SQLStatement:="select *
from [Itinerary_View]"
appWord.Visible = True
With WrdDoc.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
End With
'Perform the Merge
WrdDoc.MailMerge.Execute Pause:=False
After I try it on a SP3 machine it corrupts the word document so that it page
brekas even on a sp2 machine. Anyone got any ideas?
Thanks,
Gary
but when I try it on Word 2002 sp3 the catalog merge does page breaks for
eachj section instead of all on one page.
Set WrdDoc = appWord.Documents.Open(FileName:="\\em\office\Admissions\Events\
visits\itinerary.doc", Visible:=True)
WrdDoc.MailMerge.OpenDataSource Name:= _
"\\em\office\Admissions\Events\visits\itinerary.xls", _
ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="",
_
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False,
_
Format:=wdOpenFormatAuto, Connection:="", SQLStatement:="select *
from [Itinerary_View]"
appWord.Visible = True
With WrdDoc.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
End With
'Perform the Merge
WrdDoc.MailMerge.Execute Pause:=False
After I try it on a SP3 machine it corrupts the word document so that it page
brekas even on a sp2 machine. Anyone got any ideas?
Thanks,
Gary