Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Feed / NewPage / Eject... whatever

Status
Not open for further replies.

Easy

Programmer
Jun 15, 1999
4
US
<br>
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).<br>
<br>
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.<br>
<br>
OPEN "trash.dat" FOR OUTPUT AS #1<br>
PRINT #1, " text here "<br>
PRINT #1, vbFormFeed ' doesn't work<br>
PRINT #1, CHR$(12) ' doesn't work<br>
PRINT #1, " and this should be on another sheet "<br>
CLOSE #1<br>
<br>
Any help?<br>

 
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.<br>
<br>
Try using the "Printer" object with the "NewPage" method.<br>

 
You may also want to use the EndDoc method to chase the data from the printer object to the printer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top