Word Mail Merge and Printer Zooming!

F

fmbright

Is it possible to have a macro control the printer zooming after the mail
merge is done?? We are having problems merging labels with our macro. It
now crops the printout to show only 12 of 14 inches on a US fan fold. We can
manually set the zoom to make the print go across the page. But want to
automate our macro to do the zooming.

Any ideas on how to change the zoom once the mail merge is done??

Below is a copy of the script and what we tried!


Thanks!

FMB


-------------------------------------------------------------------
Sub xlabel1()

Documents.Open FileName:="xlabel.doc", ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto

ActivePrinter = "\\host1\ibmProprinterXL"

With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With

' print

Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0,
PrintZoomPaperWidth:=21420, _
PrintZoomPaperHeight:=0

ActiveDocument.Close savechanges:=wdDoNotSaveChanges

End Sub
 
P

Peter Jamieson

If the problem is that you can't work out how to reference the document you
created usiong the Execute statement, after the merge the "destination"
document is the ActiveDocument (assuming no error document was created), so
you probably need to use

ActiveDocument.PrintOut

etc.

FWIW I usually set a reference to the /original/ ActiveDocument before
executing the merge, e.g.

Dim objMMMD As Word.Document
Set objMMMD = ActiveDcoument

That way you can still do stuff to your mail merge main document post-merge.

If the problem is that the Zooming does not do what you need, sorry, I can't
really help you there. Interesting approach though - I will be interested to
know if you get it to work. (I've had a look at problems with printing to
dot matrix printers from Word 2002 and later in the past and found that Word
sometimes does not produce the printer escape codes that it should).

Peter Jamieson
 

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