Controlling Page Numbers in Mail-Merged Documents

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


Kath has a contract document that is 30 pages long. She can mail merge this document with approximately 50-60 client names. In the resulting merged document, the page numbering is consecutive across all the merged pages. She wonders how she can ensure that the page numbering restarts in each of the merged documents so that she has 50-60 customized contracts, each having pages numbered 1-30.

In doing some testing with this, my page numbering came out correctly. I created a 30-page mail-merge document and made sure it had page numbers. I then merged it with a 40-member client list. The result was a single document of 1,200 pages (30 x 40). Word automatically separated each of the merged documents with a section break, and the page numbering for each document (each new section) began with 1, as it should.

I then went back to my source document and inserted a few section breaks in it, thinking that this might affect the final merged document. I made sure that the page numbering was set to "continuous" for each section in the source document. When I did the merge, Word still handled the page numbering correctly in the merged document. Even though the merged document was still 1,200 pages, the page numbering was correct for each individual 30-page document in that merged document.

If you are not seeing these results with your merged document, you'll want to go to the beginning of each contract in the merged document and place the insertion point somewhere simple, like in the first line of the contract. Then, follow these steps:

  1. Display the Insert tab of the ribbon.
  2. In the Header & Footer group, click the Page Number tool. Word displays some additional options.
  3. Click the Format Page Numbers option. Word displays the Page Number Format dialog box. (See Figure 1.)
  4. Figure 1. The Page Number Format dialog box.

  5. Make sure the Start radio button is selected.
  6. Ensure the page number shown to the right of the Start radio button is set to 1.
  7. Click OK.

Make sure you repeat these steps for each of the contracts in the merged document. When completed, the page numbering should be correct in the full merged document.

If you have to do this process quite often, you may be interested in using a macro to reset the starting page number for each section of the merged document. This short macro will do the trick:

Sub RestartPageNumbering()
    Dim oSection As Section
    Dim oHeader As HeaderFooter
    Dim oFooter As HeaderFooter

    For Each oSection In ActiveDocument.Sections
        For Each oHeader In oSection.Headers
            oHeader.PageNumbers.RestartNumberingAtSection = True
            oHeader.PageNumbers.startingNumber = 1
        Next oHeader
        For Each oFooter In oSection.Footers
            oFooter.PageNumbers.RestartNumberingAtSection = True
            oFooter.PageNumbers.startingNumber = 1
        Next oFooter
    Next oSection
End Sub

Note that you should only use this macro if your source document did not have any section breaks in it.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (13546) applies to Microsoft Word 2007, 2010, 2013, 2016, 2019, and Word in Microsoft 365.

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

Crashing when Searching

If you use Excel's Open dialog box to search for files and you notice that doing so ends up crashing your system, you may ...

Discover More

Relative VBA Selections

Need to select a cell using a macro? Need that selection to be relative to the cell you currently have selected? Here are ...

Discover More

Entering Data as Thousands

There are many different ways you may need to enter data in a worksheet. For instance, you might want to enter data in ...

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)

Can't Place Merge Field in Header of a Catalog Merge Document

Word can perform several different types of mail merge operations, and the type you choose can affect how you are able to ...

Discover More

Attaching Specific Files to Mail-Merge E-Mail Messages

Want to add attachments to each e-mail message created in a mail merge? Word doesn't include the capability to do this, ...

Discover More

Creating Files with Mail Merge

When you use mail merge to create a document that incorporates all your data source records, you end up with a large ...

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 7 + 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


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.