This documentation is archived and is not being maintained.

Printer.Port Property (Access)

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

expression .Port

expression A variable that represents a Printer object.

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

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