DaveOMatic
Board Regular
- Joined
- May 13, 2005
- Messages
- 74
Hello Board, does anyone have some code tips regarding the selection of specific printer drawers in a multi-drawer printer? The macro-recorder is out too lunch in helping me on this one.
I have an HP 4650 networked printer that is accessed from multiple machines running Windows XP Office Professional.
I am printing a label sheet ( sheet 3 of a 4 sheet workbook)
.
I solved the problem of printing the label sheet via macro from different machines, as below (showing partial code in Sub):
Sheets("Lbl1").Visible = True
Sheets("Lbl1").Select
With Selection
If ActivePrinter = "HP Color LaserJet 4650-2nd Floor on Ne01:" Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"HP Color LaserJet 4650-2nd Floor on Ne01:", Collate:=True
ElseIf ActivePrinter = "HP Color LaserJet 4650-2nd Floor on Ne02:" Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"HP Color LaserJet 4650-2nd Floor on Ne02:", Collate:=True
ElseIf ActivePrinter = "HP Color LaserJet 4650-2nd Floor on Ne03:" Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"HP Color LaserJet 4650-2nd Floor on Ne03:", Collate:=True
End If
End With
Sheets("Lbl1").Visible = False
I have macro buttons on a title workbook sheet, and one of the buttons initiates printing of Avery Labels stored in drawer 4 of the printer ( the actual label sheet is hidden from the user ). However, because of XP registry settings changing by different users, the labels keep trying to print from drawers other than the label drawer. I have programmed the printer paper handling a thousand different ways and perhaps a specific code snippet similar to " Collate:= True " in drawer selection might solve my problem.
My apologies board in the length of question, did not know how to phrase it better.
Thanks in advance.
DaveOMatic
I have an HP 4650 networked printer that is accessed from multiple machines running Windows XP Office Professional.
I am printing a label sheet ( sheet 3 of a 4 sheet workbook)
I solved the problem of printing the label sheet via macro from different machines, as below (showing partial code in Sub):
Sheets("Lbl1").Visible = True
Sheets("Lbl1").Select
With Selection
If ActivePrinter = "HP Color LaserJet 4650-2nd Floor on Ne01:" Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"HP Color LaserJet 4650-2nd Floor on Ne01:", Collate:=True
ElseIf ActivePrinter = "HP Color LaserJet 4650-2nd Floor on Ne02:" Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"HP Color LaserJet 4650-2nd Floor on Ne02:", Collate:=True
ElseIf ActivePrinter = "HP Color LaserJet 4650-2nd Floor on Ne03:" Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"HP Color LaserJet 4650-2nd Floor on Ne03:", Collate:=True
End If
End With
Sheets("Lbl1").Visible = False
I have macro buttons on a title workbook sheet, and one of the buttons initiates printing of Avery Labels stored in drawer 4 of the printer ( the actual label sheet is hidden from the user ). However, because of XP registry settings changing by different users, the labels keep trying to print from drawers other than the label drawer. I have programmed the printer paper handling a thousand different ways and perhaps a specific code snippet similar to " Collate:= True " in drawer selection might solve my problem.
My apologies board in the length of question, did not know how to phrase it better.
Thanks in advance.
DaveOMatic