How can I know the number of the default printer in the collection of printers? Not the devicename but the number. Thanks!!
Printable View
How can I know the number of the default printer in the collection of printers? Not the devicename but the number. Thanks!!
You could enumerate all the Printers until you find the Default, eg.
Code:Private Sub Command1_Click()
Dim I As Integer
For I = 0 To Printers.Count - 1
If Printers(I).DeviceName = Printer.DeviceName Then Exit For
Next
MsgBox "Printer No." & I & " - " & Printer.DeviceName & vbCrLf & "Is the Default Printer"
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]