Application.ActivePrinter property (Excel)
Returns or sets the name of the active printer. Read/write String.
Syntax
expression.ActivePrinter
expression A variable that represents an Application object.
Example
This example displays the name of the active printer.
MsgBox "The name of the active printer is " & Application.ActivePrinter
The preceding example can be used to discover the proper printer and port naming conventions on your computer for use in the following example.
This example changes the active printer. The colon ":" after the port name is required.
Application.ActivePrinter = "[The name of your printer] on [port]:"
'i.e.
Application.ActivePrinter = "Canon Printer on Ne02:"
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.