A
AJ
I am trying to use a macro on my mail merge template(Word2003) to set a
specific print tray. I am calling the merge from access2003 and then am
printing out the new merged document from a module in access. I am
unsuccessful in trying to add a macro I found
(www.gmayor.com/fax_from_word.htm) to place on my template so each document
will print to a different tray. I don't know if I am doing something wrong or
am missing something. I am able to run it from Word and it will switch the
printer but not switch the tray. Then when I call the whole thing into Access
it will switch printers but not print trays.I have placed the code on the
mail merge template itself in the Document New, because to my limited
knowledge this code is suppose to carry over to the merged documents.Is that
true? I have the code below to view.Thank you ahead for any help.
Private Sub Document_New()
Dim sCurrentPrinter As String
sCurrentPrinter = Application.ActivePrinter
ActivePrinter = "\\OKKC405\IT_PS.PRINTERS"
With Options
.DefaultTray = "Tray 2"
End With
Application.PrintOut FileName:=""
With Options
.DefaultTray = "Use printer settings"
End With
ActivePrinter = sCurrentPrinter
End Sub
specific print tray. I am calling the merge from access2003 and then am
printing out the new merged document from a module in access. I am
unsuccessful in trying to add a macro I found
(www.gmayor.com/fax_from_word.htm) to place on my template so each document
will print to a different tray. I don't know if I am doing something wrong or
am missing something. I am able to run it from Word and it will switch the
printer but not switch the tray. Then when I call the whole thing into Access
it will switch printers but not print trays.I have placed the code on the
mail merge template itself in the Document New, because to my limited
knowledge this code is suppose to carry over to the merged documents.Is that
true? I have the code below to view.Thank you ahead for any help.
Private Sub Document_New()
Dim sCurrentPrinter As String
sCurrentPrinter = Application.ActivePrinter
ActivePrinter = "\\OKKC405\IT_PS.PRINTERS"
With Options
.DefaultTray = "Tray 2"
End With
Application.PrintOut FileName:=""
With Options
.DefaultTray = "Use printer settings"
End With
ActivePrinter = sCurrentPrinter
End Sub