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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page Break in a Text file

Status
Not open for further replies.

ok1397

Technical User
Feb 7, 2005
70
US
Hello everyone, was wondering if there's a way to add a page break in a text file, when certian string is found. I need to format pages in a text file. Any help is greatly appreciated. Thank you.
 
I did not think .txt files ever had formatting?
You might be able to use MS WORD to reformat your file.

Open the text file in MS WORD.
Press 'CTRL' & 'H' (Open Find & Replace)
Press 'ALT' & 'N' (Find What)
ENTER THE TEXT TO REPLACE WITH PAGE BREAK
Press 'ALT' & 'I' (Replace with What)
Press 'M' (to open more search options)
Press 'E' (Special Characters)
Press 'K' (Manual Page Break)
Press 'ALT' & 'A' (Make replacements)
Then save it as a DOC file.

 
Are you trying to force a page break when the text file is sent to a printer, or just when it is viewed? If the former, you will need to know what control character or escape sequence the printer is expecting for a page break. I think Ctrl-L is somewhat common, but that is just off the top of my head so you'll want to verify.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top