-
I created a program to print every html file in a directory to Canon LBP800 printer.
It can be more than 500 files (pages). Can someone help me to provide codes on how to pause the program if printer is not ready(out of paper etc.). If the program keep printing, and printer is not ready some of the data sent to the printer will be lost.
Thanks in advance.
-
please help
-
Won't an error come up or something? And it wouldn't print if there were no paper in the printer. Try this though:
Code:
Private Sub CMDPrint_Click()
On Error Goto NP
Printer.Print data 'whatever you want to print
Printer.EndDoc
Exit Sub
NP:
Msgbox "An error has occurred while printing!", 16, "Error: Cancelling Printing..."
Printer.KillDoc
End Sub
That's just a guess.
For more informaton, look in your Object Browser for Printer.