devxlogo

SelectPrinter – Setting the application’s default printer

SelectPrinter – Setting the application’s default printer

' Set the printer with the input name as the default printer for *this ' application* (not for the whole system)Function SelectPrinter(ByVal printer_name As String) As Boolean    Dim i As Integer    SelectPrinter = False    For i = 0 To Printers.Count - 1        ' if the specified printer is found, select it and return True        If Printers(i).DeviceName = printer_name Then            Set Printer = Printers(i)            SelectPrinter = True            Exit For        End If    Next iEnd Function

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist