|
-
Jul 29th, 2004, 11:43 AM
#1
Thread Starter
Lively Member
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
-
Jul 29th, 2004, 12:08 PM
#2
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...
-
Jul 29th, 2004, 01:23 PM
#3
Thread Starter
Lively Member
Thank you so much, Szlamany, for your quick and complete answer! That did it!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|