devxlogo

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

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  Seven Service Boundary Mistakes That Create Technical Debt

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.