Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleList available printers and select one
Keywordsprinter, select printer, list printers
CategoriesGraphics, Utilities, Windows
 
Loop through the Printers collection examining the DeviceName property until your find the printer you want. Set the Printer object to point to the Printers collection entry you want to select.
 
' Return True if there is a problem.
Private Function SelectPrinter(ByVal printer_name As _
    String) As Boolean
Dim i As Integer

    SelectPrinter = True
    For i = 0 To Printers.Count - 1
        If Printers(i).DeviceName = printer_name Then
            Set Printer = Printers(i)
            SelectPrinter = False
            Exit For
        End If
    Next i
End Function
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated