Please Note: This article is written for users of the following Microsoft Word versions: 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. If you are using an earlier version (Word 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Word, click here: Paragraph Numbers in Headers or Footers.

Paragraph Numbers in Headers or Footers

Written by Allen Wyatt (last updated November 17, 2023)
This tip applies to Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365


2

Let's say that you have a rather long document—perhaps several hundred pages—and it consists of many numbered paragraphs. In your header or footer, you would like to place the paragraph number of first paragraph on the page.

Word provides a rather easy way you can do this using the STYLEREF field. The way you implement the solution, however, depends on how you have your paragraphs numbered. If you are using Word's automatic numbering capabilities (like you would apply to a numbered list), then you should follow these steps if you want to place the paragraph number in the header:

  1. Note the style applied to the numbered paragraphs on the page.
  2. Position the insertion point at the location in the header where you want the paragraph number.
  3. Press Ctrl+F9 to insert a set of field braces.
  4. Type STYLEREF, a space, and the name of the style you noted in step 1.
  5. Type another space and then \n. Your completed field should now look like this, assuming that the style from step 1 is Body Text:
  6.      { STYLEREF "Body Text" \n }
    
  7. If you want to reference the last paragraph number on the page instead of the first, then add the \l (lowercase L) switch to the end of the field code.
  8.      { STYLEREF "Body Text" \n \l }
    
  9. Press Shift+F9 to collapse the field. It should now show the number of the first paragraph on the page.

These steps work because of the \n switch, which limits STYLEREF so that it displays only the paragraph number.

If you use a different numbering scheme for your paragraphs—such as manual numbers or perhaps SEQ fields—then the above approach will not work. Instead, you need to create a character style for your paragraph numbers and then apply it to all the numbers in the document. Then you can follow the above steps but leave out the \n switch. You'll also change the style name in the field code so that it matches whatever character style you've used. For instance, if your style is NumStyle, you would use the following field code:

{ STYLEREF NumStyle }

Provided that NumStyle is a character style, applied only to your paragraph numbers, then when you collapse the STYLEREF field, it shows only the characters you've formatted with the style (your paragraph numbers).

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (8306) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365. You can find a version of this tip for the older menu interface of Word here: Paragraph Numbers in Headers or Footers.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Adjusting Times for Time Zones

Collect a series of times in a worksheet, and you might need to adjust those times for various time zones. This involves ...

Discover More

An Average that Excludes Zero Values

Excel allows you to use functions and formulas to analyze your data. One way you can analyze your data is to use the ...

Discover More

Removing Confusion When Using AutoCorrect

AutoCorrect is a great help when writing, as it can allow you to create regular blocks of text easily. This can cause ...

Discover More

Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!

More WordTips (ribbon)

Putting Document Names in Headers or Footers

Want to include the file name of a document on the printed copy without rearranging the layout? You can use a header or ...

Discover More

Inserting the Date in a Header or Footer

Need today's date in the header or footer of your document? Here's how to get it there easily.

Discover More

Changing the Link to Previous Default for Headers and Footers

When you insert a new section in your document, Word assumes you want the headers and footers in that section to be the ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is one less than 9?

2023-11-17 13:07:19

Ray McAllister

I have worked with federal statutes that use an elaborate multilevel outline system of sections, sub sections, paragraphs, clauses, etc. to identify the various provisions within the text. The documents can run on for hundreds of pages. Glancing at any one page, you can easily lose your place in the statute. Years ago I tried my hand at formatting the statute text in MS Word so that the provision starting the text would automatically be identified in the page header. For example, text on page 11 might start with "... applied without compensation other than trading ..." But I want to know at a glance exactly which precise provision that text belongs to. The corresponding page header is:

"FIFRA §2(e)(2) (as amended by PL 108-199, 1/23/2004) Page 11 of 16"

FIFRA is the name of the statute. §2(e)(2) is the provision that begins the page: section 2, subsection (e), paragraph (2). It is derived from the following field: { STYLEREF "Default Paragraph Font" \w }. The "\w" switch inserts the paragraph number of the referenced paragraph (at the beginning of the page) in full context, with all formatting designated in the outline number format.


2019-09-30 10:43:41

Malcolm Patterson

If it's necessary to apply a character style to the paragraph numbers, that would entail a lot of work unless there's a macro to do it. In a file with a multilevel list and paragraphs started with a SEQ field, how would that be done?


This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Videos
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.