Share via


Printer.DeviceName Property

Access Developer Reference

Returns a String indicating name of the specified printer device. Read-only.

Syntax

expression.DeviceName

expression   A variable that represents a Printer object.

Example

The following example displays information about all the printers available to the system.

Visual Basic for Applications
  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

See Also