How do I find the last page break of a document?

E

Evelyn

I need to format a document that is originated in Text Only. I can get all
the formatting, including page braks. However, the first line following each
page break needs to have a formating style header. How do I find out that
this is the las page break?
 
E

Evelyn

As I am going through the formatting process, the last 'paragraph' has a
standard 'heading, which may or may not have test that follows. This is then
followed by two carriage returns, a set of unerlines, another carriage
return, then the line that needs to be formatted as a header. I have written
the macro to search for the carriage return, underlines and carriage return
and replace these with a manual page break. but how do say to format this
frst line only as the header format. When I have tried telling it to format
after the page break, it formats the entire rest of the document as the
header format. If I do it seperately, then it doesn't pick up the last page,
and continues to look for more page breaks. I need to know how the determine
the end of the document or the last page break.
 
E

Evelyn

I got it. In the process of formatting the document, I insert manual page
breaks. Then, using a variation of a macro found at MVP, I count how many
manual page breaks I have inserted. Then I do a search for manual page
breaks, move forward one character, and apply the heading format.

Thanks.
 
J

Jean-Guy Marcil

Evelyn was telling us:
Evelyn nous racontait que :
I got it. In the process of formatting the document, I insert manual
page breaks. Then, using a variation of a macro found at MVP, I
count how many manual page breaks I have inserted. Then I do a
search for manual page breaks, move forward one character, and apply
the heading format.

Thanks.

Sounds complicated... Why not include the setting "Page break before" in the
Heading style and not use page breaks at all?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org
 
Top