VB Code:
  1. ' 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.
  2.  
  3. Dim lobjPrinter As Printer
  4.  
  5. For Each lobjPrinter In Printers
  6. If UCase(Trim("Some Printer Name")) = UCase(Trim(lobjPrinter.DeviceName)) Then
  7.  
  8. Set Printer = lobjPrinter
  9.  
  10. Exit For
  11.  
  12. End If