×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Form Feed / NewPage / Eject... whatever

Form Feed / NewPage / Eject... whatever

Form Feed / NewPage / Eject... whatever

(OP)

In the old days, you merely had to send CHR$(12) to just about any old printer to start a new page.... What's the trick now? I realize this may not be a VB glitch and probably has something to do with the Windows OS, printer drivers, and/or the network (this is at work).

PROBLEM: Printing to a standard print file, how do I get a page break? I hate to have to get printer specific but if that's the only way, we're talking about an HP LaserJet.

OPEN "trash.dat" FOR OUTPUT AS #1
PRINT #1, " text here "
PRINT #1, vbFormFeed ' doesn't work
PRINT #1, CHR$(12) ' doesn't work
PRINT #1, " and this should be on another sheet "
CLOSE #1

Any help?

RE: Form Feed / NewPage / Eject... whatever

In the old days, printing was a low-level operation. Now, with the newer versions of windows it's a lot easier. You should not have to be concerned with specific control characters or printer models.

Try using the "Printer" object with the "NewPage" method.

RE: Form Feed / NewPage / Eject... whatever

You may also want to use the EndDoc method to chase the data from the printer object to the printer.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close