Single Column Please

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
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

This is just a matter of choosing the right label to use as the basis for
the mailmerge.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
S

Seasanctuary

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS said:
This is just a matter of choosing the right label to use as the basis for
the mailmerge.

When I'm recording the macro, I do choose the right label in the mail
merge wizard. For some reason, the recorded macro is choosing this
two column version. How can I get the macro to make the same label
choice I make during the recording? It's the very first available
label in Word2k in the Dot Matrix category.

One other difference I noted is the label template document created
when I'm recording the macro has only one label per sheet...which
works. During playback the label template document has two columns
and many rows. That's why I suspect the recorded macro isn't picking
the wrong _label_ but is simply mismaking the template page. Can I
alter the macro script to load a correct, saved version of the
template document?

I really appreciate the help.
 
C

Cindy M -WordMVP-

Hi 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.
Yes, the macro recorder doesn't do a very good job of recording
setting up labels. You'll notice that the recorded code hasn't picked
up the label number, or anything like that...

The first question I need to ask, however, is: Do you really need a
macro for this? Why would you run a macro to create your main merge
document (label sheet) rather than simply saving a label sheet you've
already created using the Wizard to use as a template?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
S

Seasanctuary

Cindy M -WordMVP- said:
The first question I need to ask, however, is: Do you really need a
macro for this? Why would you run a macro to create your main merge
document (label sheet) rather than simply saving a label sheet you've
already created using the Wizard to use as a template?

Every time someone goes to print out labels, they'll be exporting the
up-to-date listing (and in several different reports based on criteria
in the program) from another program into the .xls files. Then I want
Word to make label sheets based on that. If the source data weren't
subject to constant change I'd be very happy to just save finished
label sheets and reprint them whenever necessary.

Is that what you were asking about?
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

I believe that you have misunderstood what Cindy was suggesting. It is the
mailmerge main document that you save, and then re-use with the updated
datasource. Not the documents created by the execution of the mailmerge.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 
S

Seasanctuary

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