J John May 7, 2004 #1 Is it possible via code to print to a certain printer? The relevant printer is on a network Thanks
R Ron de Bruin May 7, 2004 #2 Hi John With VBA you can change the ActivePrinter and print the sheet. And set it back to your default You can change the ActivePrinter to the printer you want like this Application.ActivePrinter = "hp officejet k series on Ne00:" To know the names of your pinters Change to it in the ctrl P dialog (Cancel after you choose the printer ) and run this so you know the name Sub nameprinter() MsgBox Application.ActivePrinter End Sub If you print with code then look also at Printout in the VBA help You can fill in the name of the printer in the arguments
Hi John With VBA you can change the ActivePrinter and print the sheet. And set it back to your default You can change the ActivePrinter to the printer you want like this Application.ActivePrinter = "hp officejet k series on Ne00:" To know the names of your pinters Change to it in the ctrl P dialog (Cancel after you choose the printer ) and run this so you know the name Sub nameprinter() MsgBox Application.ActivePrinter End Sub If you print with code then look also at Printout in the VBA help You can fill in the name of the printer in the arguments
J John May 7, 2004 #3 Thanks Ron, helpful as always Ron de Bruin said: Hi John With VBA you can change the ActivePrinter and print the sheet. And set it back to your default You can change the ActivePrinter to the printer you want like this Application.ActivePrinter = "hp officejet k series on Ne00:" To know the names of your pinters Change to it in the ctrl P dialog (Cancel after you choose the printer ) and run this so you know the name Sub nameprinter() MsgBox Application.ActivePrinter End Sub If you print with code then look also at Printout in the VBA help You can fill in the name of the printer in the arguments Click to expand...
Thanks Ron, helpful as always Ron de Bruin said: Hi John With VBA you can change the ActivePrinter and print the sheet. And set it back to your default You can change the ActivePrinter to the printer you want like this Application.ActivePrinter = "hp officejet k series on Ne00:" To know the names of your pinters Change to it in the ctrl P dialog (Cancel after you choose the printer ) and run this so you know the name Sub nameprinter() MsgBox Application.ActivePrinter End Sub If you print with code then look also at Printout in the VBA help You can fill in the name of the printer in the arguments Click to expand...