Report.Printer 属性 (Access)Report.Printer property (Access)

返回或设置代表当前系统上的默认打印机的**打印机** 对象。Returns or sets a Printer object representing the default printer on the current system. 为可读/写属性。Read/write.


expressionexpression. Printer

_表达式_一个代表Report对象的变量。expression A variable that represents a Report object.


下面的示例使**Printers** 集合中的第一台打印机默认打印机的系统,,,然后报告及其名称、 驱动程序信息和端口信息。The following example makes the first printer in the Printers collection the default printer for the system, and then reports its name, driver information, and port information.

Dim prtDefault As Printer 
Set Application.Printer = Application.Printers(0) 
Set prtDefault = Application.Printer 
With prtDefault 
 MsgBox "Device name: " & .DeviceName & vbCr _ 
 & "Driver name: " & .DriverName & vbCr _ 
 & "Port: " & .Port 
End With 

另请参阅See also

报表对象Report Object