PAPER EJECTION AFTER PRINTING

Iam using printer object for printing, iam using the following code

Printer.print "..."
.
.
.
Printer.Enddoc

Printing is fine, but after enddoc the paper advances to next page.
My requirement is i want to remain in the last line of print & 
proceed printing in the same page ...
parthicapsAsked:
Who is Participating?
 
mcriderConnect With a Mentor Commented:
See the help page on the PaperSize Property of the Printer Object.

Basically, you set the Printer.Height to the paper height (in twips) and set the Printer.PaperSize to vbPRPSUser

User defined paper sizes may not work on all printers...


Cheers!
0
 
TimCotteeCommented:
Then don't issue the .enddoc line, this command ends the current document and will eject the page as you have noticed.
0
 
juttaCommented:
If you want to print more on the same page, simply omit the "Printer.Enddoc"


HTH

Jutta
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
TimCotteeCommented:
sounds like an echo! I just said that!
0
 
KDivadCommented:
Yep.
parthicaps, if you like the solution then you should give the points to TimCottee. jutta should not have posted TimCottee's comment as an answer.
0
 
parthicapsAuthor Commented:
But Printing is not started before
giving ENDDOC. I want the printing
to continue after each print statement.
0
 
mcriderCommented:
You're right, the print job is not released to the printer from VB until you execute the ENDDOC.  The only way to accomplish this is to keep track of what you're putting on a page, then call ENDDOC when you have filled the page... Instead of at the end of the document.

Hope this helps...

Cheers!
0
 
ackid32Commented:
There is another way to adjust the size of the paper. There u calculate the lines before print and adjust the paper size.
0
 
parthicapsAuthor Commented:
Is there any another method to do this.
Iam printing label after each entry
of 4 lines from the user... Pl.
suggest me a better solution.
0
 
mcriderCommented:
Sorry, but Printer.EndDoc is the only method you can execute that will release the print job from VB and send it to the printer...  You're not going to find another way using the printer object.


Cheers!
0
 
parthicapsAuthor Commented:
i want to print just 10 lines, how
to adjust the paper size before printing
0
All Courses

From novice to tech pro — start learning today.