R
RipperT
I have code in a form button that prints a report to a specific printer:
Dim stDocName As String
Dim strDefaultPrinter As String
'Get default printer
strDefaultPrinter = Application.Printer.DeviceName
'Change to secondary printer
Set Application.Printer = Application.Printers("HP LaserJet 9050 PCL6")
'Print document
stDocName = "rpt1FormalAW"
DoCmd.OpenReport stDocName, acNormal
'Switch back to default printer
Set Application.Printer = Application.Printers(strDefaultPrinter)
My problem is that "HP LaserJet 9050 PCL6" is only good for NT machines. The
XP driver for the same printer is "HP LaserJet 9050 PCL 6", so I get errors
on XP machines. Is there an OS class I can use thus (pseudo):
If OS = (NT) Then
use this printer
Else if OS = (XP) Then
use this printer
End if
Thanx,
Ripper
Dim stDocName As String
Dim strDefaultPrinter As String
'Get default printer
strDefaultPrinter = Application.Printer.DeviceName
'Change to secondary printer
Set Application.Printer = Application.Printers("HP LaserJet 9050 PCL6")
'Print document
stDocName = "rpt1FormalAW"
DoCmd.OpenReport stDocName, acNormal
'Switch back to default printer
Set Application.Printer = Application.Printers(strDefaultPrinter)
My problem is that "HP LaserJet 9050 PCL6" is only good for NT machines. The
XP driver for the same printer is "HP LaserJet 9050 PCL 6", so I get errors
on XP machines. Is there an OS class I can use thus (pseudo):
If OS = (NT) Then
use this printer
Else if OS = (XP) Then
use this printer
End if
Thanx,
Ripper