hstoessel
asked on
Print without print dialog
Hi
I want to print a document in Microsoft Word 2000 with the following code:
Sub Test ()
Documents.Open FileName:="C:\doc\letter.d oc"
Set myMerge = ActiveDocument.MailMerge
myMerge.OpenDataSource ("C:\doc\address.txt")
If myMerge.State = wdMainAndSourceAndHeader Or _
myMerge.State = wdMainAndDataSource Then
With myMerge.DataSource
.FirstRecord = 1
.LastRecord = 1
End With
End If
With myMerge
.Destination = wdSendToPrinter
.Execute
End With
End Sub
Execute prints the document, but always, the print dialog will be show.
Is is possible, to print without this dialog? How can I do that?
Thanks
Hans
I want to print a document in Microsoft Word 2000 with the following code:
Sub Test ()
Documents.Open FileName:="C:\doc\letter.d
Set myMerge = ActiveDocument.MailMerge
myMerge.OpenDataSource ("C:\doc\address.txt")
If myMerge.State = wdMainAndSourceAndHeader Or _
myMerge.State = wdMainAndDataSource Then
With myMerge.DataSource
.FirstRecord = 1
.LastRecord = 1
End With
End If
With myMerge
.Destination = wdSendToPrinter
.Execute
End With
End Sub
Execute prints the document, but always, the print dialog will be show.
Is is possible, to print without this dialog? How can I do that?
Thanks
Hans
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.