Default Printer?


Posted by Rob on June 25, 2001 10:59 AM

Is there a macro that will set the default printer for a page? I have a page that has specific margins for an impact Networked pritner I have. I was wondering if there is a way to set the printer for the users so they dont have to do it? I have tried to instruct them on how to change it, but sometimes the margins of the page get messed up. I appreciate the help :)

Posted by Ben O. on June 25, 2001 11:32 AM

Try recording a macro and changing the active printer. You'll get code like this:

Sub ChangePrinter()
Application.ActivePrinter = "HP LaserJet 5Si MX on \\Sys\PQ_HP5SI"
End Sub

-Ben

Posted by Rob on June 25, 2001 4:25 PM

I would record a macro, but the problem is that the printer needs to be changed before/as the file opens, or the margins will be messed up. Is there anyway around/to fix this?



Posted by Ben O. on June 26, 2001 6:46 AM

If you put the code to change the printer into a macro called "Sub Auto_Open()" or "Private Sub Auto_Open()", it'll run when the worksheet is opened. If that doesn't stop the margins from being messed up, you could always add code that fixes the margins after the printer is changed.

-Ben