ActivePrinter 属性

       

此属性返回或设置活动打印机名称。String 类型,可读写。

示例

本示例显示活动打印机名称。

MsgBox "The name of the active printer is " & ActivePrinter

本示例将网络 HP LaserJet IIISi 打印机设置为活动打印机。

Application.ActivePrinter = "HP LaserJet IIISi on \\printers\laser"

本示例将 LPT1 端口的本地 HP LaserJet 4 打印机设置为活动打印机。

Application.ActivePrinter = "HP LaserJet 4 local on LPT1:"