Programatically insert page breaks ?

M

mscertified

I need to insert page breaks into my document wherever a certain character
string occurs in the document.
I also need to remove all the Word inserted page breaks where the document
goes over a certain number of lines.
How could I do this?

Why? Its a long story but this document was transferred from a mainframe
computer system that formats the document with EBCDIC carriage returns.
 
S

Suzanne S. Barnhill

Remove page breaks first: search for ^m and replace with nothing. Then
search for your text string and replace with ^m.
 
G

Graham Mayor

I think your second search should replace with ^&^m or ^m^& depending on
whether the break goes before or after the text string.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
S

Suzanne S. Barnhill

Good point. I guess I assumed that he was using a dummy text string to
indicate where a page break should be.
 
G

Graham Mayor

He could have been :)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top