DriverName 属性

       

返回一个 String 值,表明指定的打印机所使用的驱动程序的名称。只读。

expression.DriverName

expression   必需。返回“Applies To”列表中的一个对象的表达式。

示例

下面的示例显示系统可用的所有打印机的信息。

Dim prtLoop As Printer

For Each prtLoop In Application.Printers
    With prtLoop
        MsgBox "Device name: " & .DeviceName & vbCr _
            & "Driver name: " & .DriverName & vbCr _
            & "Port: " & .Port
    End With
Next prtLoop