L Life Fitness Oct 5, 2004 #1 When I record a macro to change printer properties there is no code written in the editor. What am I doing wrong.
When I record a macro to change printer properties there is no code written in the editor. What am I doing wrong.
F Frank Kabel Oct 5, 2004 #2 Hi you can't manipulate these settings directly with VBA. One workaround would be to use Sendkeys within your macro
Hi you can't manipulate these settings directly with VBA. One workaround would be to use Sendkeys within your macro
L Life Fitness Oct 5, 2004 #3 I don't know how to do that. Can you offer some sample code where I can change the printer names?
G Gord Dibben Oct 5, 2004 #4 If all you want to do is change printers, the macro recorder will record that. Sub Macro1() Application.ActivePrinter = "HP DeskJet 1200C/PS on LPT1:" End Sub Sub Macro2() Application.ActivePrinter = "Epson Stylus COLOR 800 ESC/P 2 on LPT1:" End Sub For more Properties and Options, Frank's sendkeys is the way to go. For Help on Sendkeys......... Hit ALT + F11 to get to Visual Basic Editor. Help>Answer Wizard "sendkeys". Choose Sendkeys Method from results. Gord Dibben Excel MVP
If all you want to do is change printers, the macro recorder will record that. Sub Macro1() Application.ActivePrinter = "HP DeskJet 1200C/PS on LPT1:" End Sub Sub Macro2() Application.ActivePrinter = "Epson Stylus COLOR 800 ESC/P 2 on LPT1:" End Sub For more Properties and Options, Frank's sendkeys is the way to go. For Help on Sendkeys......... Hit ALT + F11 to get to Visual Basic Editor. Help>Answer Wizard "sendkeys". Choose Sendkeys Method from results. Gord Dibben Excel MVP