Microsoft word office online menu on laptop screen close up
Image: PixieMe/Adobe Stock

Microsoft Word uses several fields to display page numbers in a Word document. You may be familiar with a few already, but knowledge of all of them will help you add an error-free numbering scheme to your Word documents. A Word field is a set of instructions for displaying content. Knowing how to use Word’s four page-numbering fields will make the difference between mistakes and easy success. In this tutorial, I’ll show you how to use Word’s four page-numbering fields.

I’m using Microsoft 365 on a Windows 10 64-bit system, but you can use earlier versions. Word for the web supports existing fields, but you can’t insert them or modify them in the browser version. You can work with the downloadable demonstration files or work with your own file.

SEE: Windows, Linux, and Mac commands everyone needs to know (free PDF) (TechRepublic)

If you don’t know how to insert fields, please consider reading 3 ways to enter fields in Microsoft Word. This article assumes that you know how to insert fields, so there are no instructions.

How to use { Page } in Word

Probably the most often used page field is { Page }. This field displays the page number of the current page and uses the following syntax:

{ PAGE [\* Format Switch ] }

where the \* Format Switch overrides the default number style. It’s worth noting that this field’s limitation is 32,767 pages.

You can insert { Page } via the Insert tab or by pressing Shift + Alt + P.

Figure A shows an 8-page document with no page or section breaks. Inserting { Page } into the document header displays the current page numbers, 1 through 8, accordingly. I’m using a large font, so the numbers are easy to see — this format has nothing to do with page numbering.

Figure A

Use { Page } to return the current page number.

In a simple document, this field is enough. In some documents, you’ll also want to display the total number of pages in the document.

How to use { NumPages } in Word

Displaying the total number of pages in a document requires the { NumPages } field. This field retrieves the total number of pages from the file properties, which you can find as follows:

  1. Click the File tab.
  2. In the left pane, click Info.
  3. To the right, look for the Properties dropdown. As you can see in Figure B, the demonstration file has eight pages.

Figure B

You can find the total number of pages in the Properties section.

Figure C

Word’s { NumPages } field displays the total number of pages in the document.

As you can see in Figure C, { NumPages } displays the same number, 10, on every page — the total number of pages in the document. Earlier it was eight, but the numbers are so large that adding a new field to the header increases the page count. That will continue to happen.

Now, let’s suppose you want to display the two together in a meaningful way, such as “Page 1 of 10.” To do so, you’d use the following expression:

Page { PAGE } of { NUMPAGES }

This works just fine in a document with no section breaks or special page-numbering requirements. For instance, when the first page is an unnumbered title page, you might use the following expression:

Page { PAGE } of { NUMPAGES - 1 }

This type of expression is relatively simple, but page-numbering expressions can be complex depending on the overall numbering scheme. One area that will need special attention is sections.

How to use { SectionPages } in Word

Sections can complicate a word-numbering scheme, but fortunately, Word’s { SectionPages } field accommodates sections by displaying the total number of pages in a section.

Without section breaks, { SectionPages } displays the same thing as { NumPages } as shown in Figure D.

Figure D

It’s possible for { SectionPages } and { NumPages } to display the same page number.

After inserting a section break, you will almost always want to restart page numbering at 1 to get an accurate page count for each section.

Let’s see what happens when we add a section as follows:

  1. Position the cursor at the end of the text on page 1 before the footer.
  2. Click the Layout tab.
  3. In the Page Setup group, click Breaks.
  4. In the resulting dialog, choose Next Page in the Section Break section (Figure E).

Figure E

Insert a Next Page section break.

Figure F

Word’s { SectionPages } field updates when you add a section break.

As you can see in Figure F, { SectionPages } updates with the addition of the section break at the end of page 1. Section one has one page and section two has 10 pages. However, the { NumPages } field in the header now shows more pages in the document than the section number in the footer.

The easy fix is to restart page number at the first page in section two as follows:

  1. Double-click the header on page 2 to open the header section.
  2. Select the page number, 2.
  3. Right-click the section and choose Format Page Numbers from the resulting submenu.
  4. In the resulting dialog, change the Start At setting in the Page Numbering section to 2 (Figure G).
  5. Click OK.

Figure G

Reset the page numbering in section two.

Figure H

The { Page } field now agrees with { SectionPages }.

As you can see in Figure H, restarting the page numbering at the beginning of section two updates the { Pages } field. Here’s where we’re at right now:

  • The first two pages both start with the number 1.
  • Section one has one page.
  • Section two has 10 pages.

There’s still one issue to deal with: Word’s { NumPages } section still displays the total number of pages in the document, as a whole, which is 11. In this case, you don’t need it and the best solution is to simply delete it from the header, unless you need to display the total number of pages in the document and the total number of pages in both sections.

Figure I shows a simple expression, Page { Page } of { SectionPages } in the footer. This expression is correct for every page with little effort on our part, other than understanding the relationship between the appropriate fields and the sections. Remember that adding a new field in the footer increases the total page count. Currently, there are 15 pages and 2 sections. The first section has two pages, and the second section has 13.

Figure I

For many documents, you will need only two fields: { Page } and { SectionPages }. It’s worth mentioning that Word also has a { Section } field that returns the number of the section. For example, in our document, it would display 1 for pages 1 and 2 and 2 for all the remaining pages.