Hi Guy's,
how do i change my default printer temporary to print a document and change back when I exit my visual basic application
thank you
Printable View
Hi Guy's,
how do i change my default printer temporary to print a document and change back when I exit my visual basic application
thank you
VB Code:
' This piece of code changes the printer dynamically and only changes the printer for that application. So the actual default printer for the system remains unaffected. Dim lobjPrinter As Printer For Each lobjPrinter In Printers If UCase(Trim("Some Printer Name")) = UCase(Trim(lobjPrinter.DeviceName)) Then Set Printer = lobjPrinter Exit For End If Next