How do I choose a network printer in a macro?
How do I choose a network printer in a macro?
(OP)
I have a macro which will print an excel worksheet. I have installed it on another computer in our network but the local printer for that computer is an older model which will not print borders around excel cells or print color.
How can I have this Excel macro choose a specific network printer rather than the default printer. Currently we have to manually change the default printer before running the macro.
An alternate plan is to get the older printer (HP Laser Jet III) to print the borders and use shading in place of colors.
Any help is appreciated.
How can I have this Excel macro choose a specific network printer rather than the default printer. Currently we have to manually change the default printer before running the macro.
An alternate plan is to get the older printer (HP Laser Jet III) to print the borders and use shading in place of colors.
Any help is appreciated.





RE: How do I choose a network printer in a macro?
Just execute
rundll32 printui.dll,PrintUIEntry /y /n "printer" /q
for setting the printer you wish as default.
Print
at the end of your macro just repeat again for re set the right one.
RE: How do I choose a network printer in a macro?
Application.ActivePrinter = "[Printer & path]"
It all seems so simple now.
bpeirson.
RE: How do I choose a network printer in a macro?
' Display printer setup dialog
Application.Dialogs.Item(xlDialogPrinterSetup).Show
Hope this helps
Dave
RE: How do I choose a network printer in a macro?
Brad
RE: How do I choose a network printer in a macro?
hope this helps