The following code works as expected when running on a
win '98 system but not at all when running on a Win 2000
system.
Dim PrtName as Printer
For Each PrtName In Printers
If PrtName.DeviceName = "Receipt" Then
Set Printer = PrtName
Exit For
End If
Next
In Win '98, any printer.print statements will now print to
the printer named 'Receipt' in the printers folder.
However, in Win '2000, not only will nothing print, but
when attempting to print a test page from the printer
properties dialog, the printer will not print the test
page. Before trying to select the printer through the
above code the printer test page would print.
Does anyone know why there is a difference between the two
operating systems and what the fix would be for the
problem?
I am developing in VB 6.0
Thank you for your input
Bill
Archived from group: microsoft>public>vb>enterprise