Hi,
I have been trying to use the XPrint functions a lot lately in an effort to simplify my printing code. I have been using the following code to determine what the default installed printer is.
The XPrint Attach Default seems to create a zero byte print job. That's not too big of a deal if the printer is turned on because it appears that the print job deletes itself once XPrint Close is encountered. My problem is when the printer is not turned on. The zero length print job will stay there until I have to manually delete it.
Is there a better way to do my code above? Any other (simple) choices for determining the default installed printer?
Thanks,
I have been trying to use the XPrint functions a lot lately in an effort to simplify my printing code. I have been using the following code to determine what the default installed printer is.
Code:
#Compile Exe Function PBMain() As Long Local st As String Local y As Long XPrint Attach Default, "" For y = 1 To PrinterCount st = Printer$(Name, y) If st = XPrint$ Then MsgBox "Default print = " & st Exit For End If Next XPrint Close End Function
Is there a better way to do my code above? Any other (simple) choices for determining the default installed printer?
Thanks,
Comment