Sub Test() If Printers.Count = 0 Then MsgBox "There's no printer installed on the system." Exit Sub End If MsgBox "Default printer is: " & Printers.Default.Name & _ " on port: " & Printers.Default.PortEnd Sub