ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Default printer selection in Excel macro (https://www.excelbanter.com/excel-programming/357909-default-printer-selection-excel-macro.html)

Charlie

Default printer selection in Excel macro
 
I am writing a simple macro to allow some of the people in our company to
click on a toolbar button that will select our fax printer, send a fax, and
then reset the selected printer to the default.

What do I put after this:

Application.ActivePrinter =

Thanks,


Charlie

Ron de Bruin

Default printer selection in Excel macro
 
Try this

Dim DPrinter As String
DPrinter = Application.ActivePrinter
Application.ActivePrinter = "Microsoft Office Document Image Writer on Ne01:"
ActiveSheet.PrintOut
Application.ActivePrinter = DPrinter



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Charlie" wrote in message ...
I am writing a simple macro to allow some of the people in our company to
click on a toolbar button that will select our fax printer, send a fax, and
then reset the selected printer to the default.

What do I put after this:

Application.ActivePrinter =

Thanks,


Charlie





All times are GMT +1. The time now is 11:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com