Headers, Footers and Page Number

T

Tom Baxter

Hi everyone,

I have a simple problem (simple to describe) but for me, hard to solve.

At the end of this question I have a schematic that shows what I'm trying to
achieve. You might want to look at that before even reading my description of
the problem.

I have a document with a cover page and two subsequent sections. The cover
page is the first section.

The cover page has no header and no footer, which is what I want.

The second section (i.e., the section that follows the cover page) has its
own header and footer. The footer has the page numbers of the form, "Page X
of Y". Note that the total pages, "Y", does not include the cover page, which
is what I want. For "Y" I am using the SECTIONPAGE field, which gives me the
total number of pages in the section. I had tried using NUMPAGES (total pages
in the document) but that number included the cover page.

The third section is where problems start to show up. The third section has
its own header, which I want, but the page numbering in the footer has a
problem. I want the page numbering in the third section to basically continue
from the second section. The problem is that the page number in the third
section basically starts over at 1 and the total pages appears as the total
pages in section 3. What I want is the first page in section 3 to be numbered
with the last page in section 2 plus 1.

I want the total pages in both the section 2 and section 3 footers to
represent the total pages in the document, minus the cover page.

Here's a simple schemtic of what I want, showing a cover page with a 4
content pages:

--------------
COVER PAGE
--------------

--------------
Header: "Section 2"

Footer: "Page 1 of 4"
 
T

Terry Farrell

Use { = { PAGES } -1 } in the footers.

But have you looked at the StyleRef field to see if negates the need for
separate sections? The StyleRef field can be cross-referenced to any style
(usually say a Heading Style or Chapter Name style): then on each page, the
StyleRef looks from the nearest instance of the style looking from the top
to bottom of the page and then backwards if it doesn't find one on that
page. That lets you use the Different First Page option in Page Layout so
that you can leave the cover page header/footer-less and have H&Fs on the
subsequent pages without need for any section breaks.
 
T

Tom Baxter

Thanks, Terry.

The { = { PAGES } -1 } worked great.

I looked at the StyleRef field you mentioned but frankly I could not see how
it would help me. I am not interested in Styles (at least I don't think I am)
for this problem. My primary need was to have consistent page numbering
across all section footers yet have differend headers in each section.

But thank you for the help and the suggestion.
 
M

macropod

Hi Tom,

Whilst Terry's approach is fine where you can be sure the page count for the first Section won't change, the following technique can
be used where the un-numbered pages count is liable to change.
In the un-numbered section, insert a field coded like {SET UnNumbered {Sectionpages}}. This create a bookmark named 'UnNumbered'
with a value equal to the number of pages in that Section.

Then, in the sections where you want X of Y page numbering, use {={NUMPAGES}- UnNumbered} for the 'Y' part.

If you’ve got more than one unnumbered section, replicate the process for each, using a different bookmark name each time, then
subtract all the bookmarks from the NUMPAGES value.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.
 
T

Tom Baxter

Hi macropod,

That's a great explanation. I'll will save it away. Thanks very much.
--
Tom Baxter


macropod said:
Hi Tom,

Whilst Terry's approach is fine where you can be sure the page count for the first Section won't change, the following technique can
be used where the un-numbered pages count is liable to change.
In the un-numbered section, insert a field coded like {SET UnNumbered {Sectionpages}}. This create a bookmark named 'UnNumbered'
with a value equal to the number of pages in that Section.

Then, in the sections where you want X of Y page numbering, use {={NUMPAGES}- UnNumbered} for the 'Y' part.

If you’ve got more than one unnumbered section, replicate the process for each, using a different bookmark name each time, then
subtract all the bookmarks from the NUMPAGES value.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message.

--
Cheers
macropod
[Microsoft MVP - Word]
 

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