CodeItBetter Programming Another VB Programming Blog

How to Check whether a Printer is Installed

Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'System & API - How to Check whether a Printer is Installed

Public Function IsPrinterInstalled() As Boolean
    On Error Resume Next
    Dim strDummy As String
    strDummy = Printer.DeviceName
    If Err.Number Then
        PrinterInstalled = False
        Debug.Print "Printer is not installed"
    Else
        PrinterInstalled = True
        Debug.Print "Printer is installed"
    End If
End Function
 
Private Sub Main()
    MsgBox IsPrinterInstalled
End Sub
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.