VBA in Excel - Change Active Printer
Posted on 2013-06-09
I have an excel sheet that I has a button that when clicked should print the print area as a PDF (or save as instead, but I have the print part working) and then show me a Print Preview of the same page so that I can review and optionally click "print" and send it to a physical printer. However, the print to PDF is changing the active printer to the PDF now forcing me to change it back manually every time - this is unacceptable.
I would have thought there was a fairly easy way to tell Excel "on the next print attempt (Or more specifically, PRINT PREVIEW), use this printer"
I might be able to debug from other code and figure it out but I'm apparently experiencing logic/google foo problems and cannot come up with a timely answer.
So, without ACTUALLY initiating the printing, how to I set the excel sheet to target a specific printer the next time I print (I keep getting Run-time error '1004': Method 'ActivePrinter' of object '_Global' failed when I attempt to change it with what would seem the obvious answer ActivePrinter = "\\server\PrinterShare"