Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.1 KB

Excel.Application.ActivePrinter.md

File metadata and controls

46 lines (29 loc) · 1.1 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Application.ActivePrinter property (Excel)
vbaxl10.chm183078
vbaxl10.chm183078
Excel.Application.ActivePrinter
72c4a525-27ab-f109-64d3-bcc7a12df505
04/04/2019
medium

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:"

[!includeSupport and feedback]