A
Al & Cay Grant
Hi All,
I tried to make a macro to select a printer tray on our
MFD konica copier/printer at work which has 4 trays.
I recorded:
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 17 September 2003 by AGG530
'
Selection.TypeText Text:="TEST BOTTOM TRAY'"
Selection.TypeParagraph
Selection.TypeBackspace
Selection.TypeBackspace
Selection.TypeParagraph
Selection.TypeParagraph
With Options
..UpdateFieldsAtPrint = False
..UpdateLinksAtPrint = False
..DefaultTray = "Tray 4"
..PrintBackground = False
..PrintProperties = False
..PrintFieldCodes = False
..PrintComments = False
..PrintHiddenText = False
..PrintDrawingObjects = True
..PrintDraft = False
..PrintReverse = False
..MapPaperSize = True
End With
With ActiveDocument
..PrintPostScriptOverText = False
..PrintFormsData = False
End With
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
Collate:=True, Background:=False, PrintToFile:=False
End Sub
This code works and I have run it a few times, it correctly prints from tray
4.
I inserted the code into my project and it does'nt work in my project. I
copied
everything using the clipboard except the sub and end sub.
I did msgbox options.defaulttray gives "tray 4"
So what am I doing wrong?
Cheers
- AL
I tried to make a macro to select a printer tray on our
MFD konica copier/printer at work which has 4 trays.
I recorded:
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 17 September 2003 by AGG530
'
Selection.TypeText Text:="TEST BOTTOM TRAY'"
Selection.TypeParagraph
Selection.TypeBackspace
Selection.TypeBackspace
Selection.TypeParagraph
Selection.TypeParagraph
With Options
..UpdateFieldsAtPrint = False
..UpdateLinksAtPrint = False
..DefaultTray = "Tray 4"
..PrintBackground = False
..PrintProperties = False
..PrintFieldCodes = False
..PrintComments = False
..PrintHiddenText = False
..PrintDrawingObjects = True
..PrintDraft = False
..PrintReverse = False
..MapPaperSize = True
End With
With ActiveDocument
..PrintPostScriptOverText = False
..PrintFormsData = False
End With
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
Collate:=True, Background:=False, PrintToFile:=False
End Sub
This code works and I have run it a few times, it correctly prints from tray
4.
I inserted the code into my project and it does'nt work in my project. I
copied
everything using the clipboard except the sub and end sub.
I did msgbox options.defaulttray gives "tray 4"
So what am I doing wrong?
Cheers
- AL