View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Norman Jones
 
Posts: n/a
Default excel macro to automatically change default printer

Hi James,

Try something like:

'=============
Private Sub Workbook_Activate()
Application.ActivePrinter = "HPPhpoto on LPT1:"
End Sub
'<<=============

'=============
Private Sub Workbook_Deactivate()
Application.ActivePrinter = _
"EPSON Stylus Photo 830U Series on Ne01:"
End Sub
'<<=============

This is workbook event code and should be pasted into the workbook's
ThisWorkbook module *not* a standard module or a sheet module):

Right-click the Excel icon on the worksheet
(or the icon to the left of the File menu if your workbook is maximised)
Select 'View Code' from the menu and paste the code.
Alt-F11 to return to Excel.

Change the printers so suit your scenario.


---
Regards,
Norman



"James Bromley" <James wrote in message
...
I need a macro to change the default printer to another selected
preselected
printer.
I can get a workbook to do this but only after its been opened and then
re-run the macro.
this is to automate a workbook that has to be printed out on one type of
printer only and the users that will have it are not the sharpest biters
in
the food chain!!