Page numbering

B

Brian T

I am putting together a document with several sections and would like to have
in the header Page X of Y, and in the footer the running page number of the
entire document.
 
J

Jay Freedman

I am putting together a document with several sections and would like to have
in the header Page X of Y, and in the footer the running page number of the
entire document.

If you have Word 2003 or earlier, open the header area (View > Header and
Footer), which causes the Header & Footer toolbar to appear. Click the Insert
AutoText button and choose "Page X of Y" from the list.

If you have Word 2007, right-click the header area and choose Edit Header. That
causes the Header & Footer Tools tab of the ribbon to appear. Click the Page
Number button, choose Top of Page, and then choose the "Page X of Y" entry from
the list.

You can then edit the footer. If there's only one section in the document, the
running page number will be a Page field exactly the same as the X part of the
"Page X of Y" entry. If there are multiple sections with restarted page
numbering, you'll have to construct a formula field to add the current page
number to the running total from the last page of the preceding section.
 
B

Brian T

The Page X of Y in the header gives me page number of the document and the
number of pages on the document. For example, the document has 10 sections
and 101 pages. Section 3 has 4 pages starting on document page 5. I am
trying to get the header to be Page 1 of 4, etc. and have the document page
in the footer. I tried inserting Page X of Y and Page 5 of 101 was inserted
not Page 1 of 4.

Any other thoughts?
 
J

Jay Freedman

It's more complicated than that, I'm afraid.

Brian, if you look at the fields embedded in the standard Page X of Y insert,
the X is a Page field and the Y is a NumPages field.

The Page field always displays the "logical" page number -- that is, if you
restart page numbering at the beginning of the section, then the Page field will
display 1 on the first page of the section and so forth. Evidently you haven't
done any restart, which is why the Page field is showing 5.

The NumPages field always displays the total number of pages in the document --
in your case, 101. Suzanne suggested changing this field to a SectionPages
field, which shows the number of pages in the current section. That is what you
want.

So you need to do both things, restart page numbering at 1 in each section _and_
replace the NumPages field with a SectionPages field. That will get the right
results in the header.

But now you'll have a problem in the footer, because there is no simple field
that will display the running total of physical pages. That's why my original
reply included this:

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all
may benefit.
 
S

Suzanne S. Barnhill

And FWIW, here are my instructions for that to another recent questioner
(unedited):

Some of the things you ask for are easy enough. For "Section 1, page 1/15,"
you would use "Section { SECTION }, page { PAGE }/{ SECTIONPAGES }, and for
"page 23 of 65," the second number is provided by the { NUMPAGES } field.

The difficult part is the first number in this latter arrangement, because
the { PAGE } field always returns the page number that would be printed on
the page (even if it doesn't print), and you're restarting numbering in each
section. So you're going to have to use a calculated page number, and this
calculation is going to be different for each section, so the footers will
have to be unlinked.

You'll need to insert a bookmark on the last page of each section; for
simplicity, let's say we'll label the bookmarks Section1, Section2, etc.
Make sure you insert the bookmark somewhere that will be sure to be the last
page but where it is not likely to be inadvertently deleted.

Your Page X of Y in Section 1 will be a straightforward { PAGE } of {
NUMPAGES}.

In Section 2, you'll need to add the current page number to the number of
pages in Section 1, which you'll do by referencing the page number on the
last page of Section 1: { = { PAGEREF Section1 } + { PAGE } } of {
NUMPAGES }.

Each subsequent section will have to add a PAGEREF to the bookmark on the
last page of the preceding section, so Section 3 would be: { = { PAGEREF
Section1 } + { PAGEREF Section2 } + { PAGE } } of { NUMPAGES }.

As you can see, this is very cumbersome; unless this is absolutely required,
it is rarely worth the effort.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 

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