S
Seasanctuary
I'm trying to set up a mail merge with a single column of labels per
page. Oddly enough, this works just great if I step through Word
2000's mail merge wizard by hand. When I try to create a macro of
those steps, however, I get two columns per page. Our printer
definitely needs the labels in one column.
I would really appreciate advice on how to alter the macro code. As
you can see, I'm making the mailing labels from an Excel spreadsheet.
Again, this works great when I'm _recording_ the macro but does the
extra column on playback. Thanks for any help!
##VB Code##
ActiveDocument.MailMerge.MainDocumentType = wdMailingLabels
ActiveDocument.MailMerge.OpenDataSource Name:="C:\AcsLabs.xls", _
ConfirmConversions:=False, ReadOnly:=False,
LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:="", _
WritePasswordDocument:="", WritePasswordTemplate:="",
Revert:=False, _
Format:=wdOpenFormatAuto, Connection:="Entire Spreadsheet",
SQLStatement _
:="", SQLStatement1:=""
Application.MailingLabel.DefaultPrintBarCode = False
Application.MailingLabel.CreateNewDocument Name:="", Address:="",
AutoText _
:="ToolsCreateLabels1"
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
End Sub
page. Oddly enough, this works just great if I step through Word
2000's mail merge wizard by hand. When I try to create a macro of
those steps, however, I get two columns per page. Our printer
definitely needs the labels in one column.
I would really appreciate advice on how to alter the macro code. As
you can see, I'm making the mailing labels from an Excel spreadsheet.
Again, this works great when I'm _recording_ the macro but does the
extra column on playback. Thanks for any help!
##VB Code##
ActiveDocument.MailMerge.MainDocumentType = wdMailingLabels
ActiveDocument.MailMerge.OpenDataSource Name:="C:\AcsLabs.xls", _
ConfirmConversions:=False, ReadOnly:=False,
LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:="", _
WritePasswordDocument:="", WritePasswordTemplate:="",
Revert:=False, _
Format:=wdOpenFormatAuto, Connection:="Entire Spreadsheet",
SQLStatement _
:="", SQLStatement1:=""
Application.MailingLabel.DefaultPrintBarCode = False
Application.MailingLabel.CreateNewDocument Name:="", Address:="",
AutoText _
:="ToolsCreateLabels1"
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
End Sub