-
Activating the printer.
Hello, all.
I have this code, in VB:
Code:
Sub Private Sub Form_Load()
Printer.Print, "This is line 1"
Printer.Print, "And, this is line 2"
End Sub
When I run it, it sends the two lines to the printer, but, it only prints if:
1. I press the printer's manual PRINT key.
2. Or, if I end the sub by clicking the black square in VB's Menu bar
3. Or, if I end the sub by adding End before the End Sub
Adding the following line, just before the End sub, did NOT fix the problem:
Printer.Print , Chr(12) ' Form feed
How would I fix this so that I can tell the printer to print those two lines, other than by the above three methods?
Thanks for any help
Ralph
-
printer.newpage - skips to a new page
and
printer.enddoc - closes the document and starting printing
formfeeds - chr(12) - are not what windows print drivers want for page ejecting...
-
Thank you so much, Szlamany, for your quick and complete answer! That did it!