Is there any way to insert a page break in plain .txt file from within VB6 ?

Thank You
AlexF777Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TomLaw1999Commented:
use the ForcePageBreak Property. i.e.

object.ForcePageBreak = integer

The settings for integer are:

Constant Value Description
rptPageBreakNone 0 (Default) No page breaks occur.
rptPageBreakBefore 1 The page break occurs before the current section.
rptPageBreakAfter 2 The page break occurs after the current section.
rptPageBreakBeforeAndAfter 3 Page breaks occur both before and after the current section
0
EDDYKTCommented:
N0

8->
0
frodomanCommented:
Maybe.  

You can insert chr(11) which is the ascii standard "form feed" character; however, whether this is handled as a page break depends on which application you use to display the .txt file...
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Bob LearnedCommented:
If you are going to open the text file in a program like Word, something like this will work:

   Open "c:\temp\test.txt" For Output As #1
   
   Print #1, "This is a test" & Chr$(12)
   Print #1, "This line is on the next page"
   
   Close #1


   Chr$(12) is the page feed character.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
EDDYKTCommented:
That may not be recognized by the printer

;->
0
frodomanCommented:
TheLearnedOne is right - the page feed character is ascii 12 not 11.
0
Bob LearnedCommented:
Generally speaking, Ascii(12) is the universal character for page feed.  It may not work in 100% of the cases, but it was true from back in the days when I used dot matrix printers, and it should still be true with other printer types.
0
holgraveCommented:
How about vbCR & vbLF, LF being line feed.
0
JepalCommented:
vbFormFeed works too if you don't like remembering ASCII.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.