Image: BigTunaOnline/Shutterstock

Any Microsoft Word document over a couple of pages usually has a page number, in the header or footer. By inserting one of Word’s page-numbering fields, these numbers are dynamic—updating as you insert and delete pages. The resulting page numbers are digits, but what if you want to spell out those numbers? Fortunately, doing so isn’t as difficult as you might think. In this article, I’ll show you how to turn page number digits into their corresponding words.

SEE: 83 Excel tips every user should master (TechRepublic)

I’m using Microsoft 365 on a Windows 10 64-bit system, but you can use earlier versions. You can create your own Word document or download the demonstration .docx and .doc files. Word Online doesn’t support fields. This article assumes you know about fields, but if not, don’t worry. You should be able to follow the instructions to success.

About fields in Microsoft Word

If you’re familiar with Word fields, you’re a step ahead. If not, they’re not difficult to use, but the process might feel a bit odd at first. Fields are little programs that complete a specific task, similar to a macro, but you don’t need to write any code. Everything the field needs to do its job is already there.

You use fields almost every time you use Word, but you just don’t realize it. For instance, when you use the interface to display a page number in the header or footer, you’re using a field! If you’d like to see that at work, open a new document and enter a page number in the header. Then, select the page number and press Alt + F9. Word converts the page number to its underlying { PAGE } field. In this mode, you can modify the field. Press Alt + F9, which acts as a toggle, to see the page number.

You can enter fields via the interface, but I think the easiest way is to type the field’s text and any switches, and then convert that text into a field by selecting the text and pressing Ctrl + F9. To learn more about fields, read 3 ways to enter fields in Microsoft Word.

We’ll be working with the following fields:

  • { Page }—Returns the current page number.
  • { NUMPAGES }—Returns the total number of pages.

How to use page-numbering fields in Microsoft Word

As mentioned, the page-numbering fields display digits. Let’s take a quick look at the field expression that returns the following numbering format: “Page x of y,” where x is the current page and y is the total number of pages.

First, open a blank document and add a few pages (I’ll add four). Open the header by double-clicking in the white space above the top margin. You can also use the footer, but we’ll stick with the header. Then, do the following:

  1. Enter Page and follow with a space.
  2. Enter PAGE (Page PAGE). Yes, you’re entering the same word again, but we’ll convert this instance to a field. Word doesn’t care about the case when entering fields, but in general, you will see the field code in all uppercase and switches in proper case. This is only a guideline and not strictly necessary. (We’ll talk about switches in a moment.)
  3. Select PAGE (the second occurrence) and press Ctrl + F9. Doing so will convert PAGE into a field, { PAGE }.
  4. Enter another space followed by of and another space.
  5. Ener NUMPAGES. Then, select NUMPAGES and press Ctrl + F9 to convert it into the field, { NUMPAGES }, as shown in Figure A. Right now, you see the actual fields.
  6. Press Alt + F9 to display the resulting page numbers instead of the field codes.

Figure A

As you can see, the { PAGE } field displays digits for the current page number, and { NUMPAGES } displays the total number of pages in the document. When you want to spell out the numbers, you can add a switch.

How to spell numbers with a switch in Microsoft Word

In the context of fields, a switch provides additional information, usually formatting, and is preceded by the character. Adding a switch is simple.

SEE: Office 365: A guide for tech and business leaders (free PDF) (TechRepublic)

If you closed the header earlier, open it now. Press Alt + F9 to display the underlying field codes and enter the following switch, *Cardtext, as shown in Figure B. This switch displays text instead of digits. Press Alt + F9 again to show the same page numbers, but instead of digits, the fields use text: one, two, three, four and so on. This combination of regular text and fields creates a useful page-numbering scheme.

Figure B

As is, the textual numbers use lowercase. What can you do to use proper case?

How to use proper case with a switch

By default, the text numbers, one, two, and so on, are all lowercase. To force proper case, add the *Caps switch to the fields, as shown in Figure C. Open the header, press Alt + F9 to display the field codes, add the *Caps switch, and press Alt + F9 to display the results.

Figure C

Stay tuned

You can use the same switches with section page numbering fields, { SECTION } and { SECTIONPAGES}. In a future article, I’ll show you how.

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays