orange
07-18-2003, 10:01 PM
My developing environment is as follow:
Window 2000 Professional
Visual Basic 6.0 with service pact 5
Crystal Report 9.0
Here are part of my program for printing out the report
Dim prt As Printer
For Each prt In Printers
If prt.DeviceName = "HP LaserJet 4/4M Plus PS 600" Then
Set Printer = prt
Report.SelectPrinter prt.DriverName, prt.DeviceName, prt.Port
Exit For
End If
Next
Report.PrintOut
I am using the above codes to call the SelectPrinter function, but what I get for prt.DriverName is "winspool". Connection error occured as a result. Any idea how can I get the real name for my printer driver?
Please help!
Window 2000 Professional
Visual Basic 6.0 with service pact 5
Crystal Report 9.0
Here are part of my program for printing out the report
Dim prt As Printer
For Each prt In Printers
If prt.DeviceName = "HP LaserJet 4/4M Plus PS 600" Then
Set Printer = prt
Report.SelectPrinter prt.DriverName, prt.DeviceName, prt.Port
Exit For
End If
Next
Report.PrintOut
I am using the above codes to call the SelectPrinter function, but what I get for prt.DriverName is "winspool". Connection error occured as a result. Any idea how can I get the real name for my printer driver?
Please help!