December 17th, 2003, 03:19 PM
Page breaks in Wordpad or Notepad
Does anyone know how to insert a page break in a text file so that either Wordpad or Notepad will recognize it? I have a program that creates a report file, and this file may sometimes contain more than one page. Adding a form feed character - Chr$(12) doesn't seem to work. It shows in Notepad, but has no effect when printing the document, and it doesn;t show at all in Wordpad. Any ideas would be appreciated.
December 17th, 2003, 04:57 PM
Don't they automatically go to the second page when the first one fills up? If you need to "make" it page break (besides using a stronger word processor) you could guest-i-mate and hit enter a few time where you want it to break forcing the bottom half on to the next page.
WordPad has a build it PreView button to help you out.
December 17th, 2003, 05:36 PM
These files are being created by Visual Basic programs that I have written. Adding a form feed character to the file works perfectly on one of the PC's that is using these programs/files when loading them into WordPad (Win98SE). The page break does not display on screen, but when the file is printed, it comes out on multiple pages just as intended. However, it doesn't print on multiple pages using WordPad on other PC's with Win98FE or Win2000. I haven't tried it on another WIn98SE PC, but WordPad should not have changed much, if at all, between versions of 98 & 2000.
The idea behind the report files is to automatically save and print the data from the status screens of the VB programs. The information is supposed to be written down and checked, but that isn't happening, so I added code to create the files, and start a text file program (WordPad or NotePad) and have them automatically printed. However, I can only get them to print with proper paging on one PC. A usable (but not preferred) alternative would be a free text editor program that would recognize form feed characters as page breaks.
Yes, I could add some extra line feeds to each page, but that solution is not ideal either, since I have no way of knowing what the default margins might be set for on different PC's. Without that information, I don't know how many line feeds to add so that the header lines for the next page start at the top.
Using Word isn't an option, since it won't necessarily exist on the PC where the programs are being run, and I'd have to change the font before printing it out anyway.
Last edited by jdc2000; December 17th, 2003 at 05:41 PM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)