S
Steven Taylor
I am running code from within Access to print a mail merge
document:
Function OpenContract(ContracType as Integer)
Dim ContFile As String
Dim WrdApp As New Word.Application
ContFile = ContractDocumentName(ContractType) 'Produces
the path and name of the mail merge document
WrdApp.Documents.Open ContFile
With WrdApp.ActiveDocument.MailMerge
..Destination = wdSendToPrinter
..Execute
End With
WrdApp.ActiveDocument.Close savechanges:=False
WrdApp.Quit
End Function
This works fine but after the .Execute command a print box
appears for the user to select the printer to print on etc.
What code do I use to automatically select the printer and
print 2 copies?
TIA
S Taylor
document:
Function OpenContract(ContracType as Integer)
Dim ContFile As String
Dim WrdApp As New Word.Application
ContFile = ContractDocumentName(ContractType) 'Produces
the path and name of the mail merge document
WrdApp.Documents.Open ContFile
With WrdApp.ActiveDocument.MailMerge
..Destination = wdSendToPrinter
..Execute
End With
WrdApp.ActiveDocument.Close savechanges:=False
WrdApp.Quit
End Function
This works fine but after the .Execute command a print box
appears for the user to select the printer to print on etc.
What code do I use to automatically select the printer and
print 2 copies?
TIA
S Taylor