Macro used to print... but no longer...?

K

Kenneth

Howdy,

Below is a macro that I used successfully on a Win 2000 box.
It would run a merge, then print labels.

Now, on a new XP box, it opens the print dialog instead. The
correct printer is chosen, but, in order to print, I must
click OK.

Can you spot the problem, and suggest a modification?


Sub Macro2()
'
' Macro2 Macro
' Macro recorded 9/27/2006 by
'
Documents.Add Template:="F:\Templates\Label 4x2.dot",
NewTemplate:=False, _
DocumentType:=0
Selection.Font.Size = 36
Selection.Font.Bold = wdToggle
ActiveDocument.MailMerge.MainDocumentType =
wdFormLetters
ActiveDocument.MailMerge.OpenDataSource
Name:="Z:\Data\let.txt", _
ConfirmConversions:=False, ReadOnly:=False,
LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:="", _
WritePasswordDocument:="",
WritePasswordTemplate:="", Revert:=False, _
Format:=wdOpenFormatAuto, Connection:="",
SQLStatement:="", SQLStatement1 _
:=""
ActiveDocument.MailMerge.EditMainDocument
ActiveDocument.MailMerge.Fields.Add
Range:=Selection.Range, Name:="First"
With ActiveDocument.MailMerge
.Destination = wdSendToPrinter
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
End Sub



Very sincere thanks,
 
G

Graham Mayor

Stick with the other thread!

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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