Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / February 2004

Tip: Looking for answers? Try searching our database.

Single Column Please

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Seasanctuary - 11 Feb 2004 16:42 GMT
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
Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS - 12 Feb 2004 00:24 GMT
This is just a matter of choosing the right label to use as the basis for
the mailmerge.

Signature

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

> 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
[quoted text clipped - 36 lines]
>    End With
> End Sub
Seasanctuary - 12 Feb 2004 10:34 GMT
> 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.
Cindy M  -WordMVP- - 12 Feb 2004 15:55 GMT
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 :-)
Seasanctuary - 12 Feb 2004 20:37 GMT
> 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?
Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS - 13 Feb 2004 04:47 GMT
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.

Signature

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

>> 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
[quoted text clipped - 9 lines]
>
> Is that what you were asking about?
Seasanctuary - 13 Feb 2004 17:03 GMT
> 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.

Ah...well at any rate, I figured it out with your help in this thread:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=eebfi8CxDHA.
3416%40tk2msftngp13.phx.gbl&rnum=5&prev=/groups%3Fq%3Dwdmailinglabels%26hl%3Den%
26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26selm%3Deebfi8CxDHA.3416%2540tk2msftngp13.phx
.gbl%26rnum%3D5

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.