You are here:

Microsoft Word/Page number - section vs full document


I'm going crazy trying to properly calculate the page numbers within my document (word 2010).

The document is structured with 10 sections, each approximately 5 pages long. What i would like to accomplish:
- Header contains Page X of Y for the section (was able to accomplish using fields)
- Footer contains the page number within the full document (EX: Section 2 Page 2 of 5 in the header, Footer would read page 7)
- Table of contents with hyperlinks - which should populate with the page number from the footer - not the header

Not sure how tricky this is or if I would be better off to just do some of the work manually. Problem is - while this is a 50 page document - I have a 2500 page document coming up, so manually updating will no be an option at that point.

Any assistance will be greatly appreciated!


Although this is a common request, it is not easily fulfilled. A TOC will always use the page number represented by the PAGE field. That means that you must use the actual PAGE field in the footer, not restarting numbering in each section. The Y of the Page X of Y for a given section is easy enough, using SectionPages instead of NumPages, but the only way you are going to get a section page number in the header (since there is no SectionPage field) is by calculation, and that means that you're going to have to have a bookmark on the last page of each section and use a calculated page number for the following section that references that bookmark. For example:

Section 1 has five pages. In the header you can have { PAGE } of { SECTIONPAGES }. On the last page of section 1, you insert a bookmark, say Section1.

In section 2, the page number in the header will have to be { = { PAGE } - { PAGEREF Section1} }. At the end of section 2, you insert another bookmark, say Section2.

In section 3, the header page number will be { = { PAGE } - { PAGEREF Section2} }.

This will all update pretty much automatically and without problems provided the bookmark stays put. If text is added to a section after the bookmark, then of course it won't be correct. So the trick is putting the bookmark somewhere where it won't be deleted and will always be on the last page of the section--not an easy task.
About Microsoft Word
This topic answers questions related to Microsoft Word stand-alone or Microsoft Office Word including Word 2003, Word 2007, Office 2000, and Office XP. You can get Word help on formatting text, tables, tabs, fonts, styles, general Word layouts, bullets, headings, and outlines, using templates, toolbar modifications, and using Track Changes. You may also find tips on linking Word and Excel embedded objects including charts. This site does not provide a general Word tutorial nor the basics of using a word processor. It provides specific answers to using Microsoft Word only. If you do not see your Word question answered in this area then please ask a Word question here

Microsoft Word

All Answers

Answers by Expert:

Ask Experts


Suzanne S. Barnhill


I've been using Word for Windows since version 2.0 (1992), and the more I learn about it, the more I realize how little I know. But I may know a few things that you don't, and I'll help if I can. I answer many questions every day in Microsoft's peer support forums and as a result have been awarded the MVP (Most Valuable Professional) designation by Microsoft Corporation. You may be able to find the answer to your question at the Word MVPs' FAQ site or at my own Word FAQ site, so please check those first! Please, no questions about VBA (macros), Registry editing, networks, or complex merges, as I have no experience with these aspects of Word, nor do I have any experience with Word for Mac. Please indicate which version of Word you are using; if you are not sure, see "What version of Word do I have?".


I have a master's degree in classics (Latin), which is surprisingly helpful, though I no longer teach. The things I am proudest of: Having raised two children to maturity, both Merit Scholars, both college graduates (one a philosophy major!), one Phi Beta Kappa (from Harvard!); having been made a Paul Harris Fellow by my Rotary club; having been designated a Microsoft MVP.

Rotary Club of Fairhope, Friends of the Fairhope Public Library

B.A. (Latin), Agnes Scott College, 1966; M.A. (Classics), Emory University, 1972.

Awards and Honors
Microsoft Most Valuable Professional award every year since 1999; many Rotary honors

©2017 All rights reserved.

[an error occurred while processing this directive]