Unable to insert page number in WORD

Phillip Richcreek 130 Reputation points
2025-12-13T22:43:45.63+00:00

The Page Number option in Headers and Footers is grayed out. Thanks for your help,
SweetTasha

Microsoft 365 and Office | Word | For home | Windows
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-13T22:43:54.3533333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    If the Page Number option in Headers and Footers is grayed out in Word, it could be due to a few reasons:

    1. Document Protection: Check if the document is protected. If it is, you may need to unprotect it to make changes to the headers and footers.
    2. Section Breaks: Ensure that you are not in a section of the document where headers and footers are disabled. Sometimes, certain sections may have different settings.
    3. Compatibility Mode: If the document is in compatibility mode (for older versions of Word), some features may be limited. Try converting the document to the latest format.
    4. Editing Restrictions: If the document has editing restrictions, you may need to remove these restrictions to access the Page Number feature.

    You can also insert page numbers programmatically using the following code snippet if you are working with VSTO Add-ins:

    C#

    foreach (Word.Section section in this.Application.ActiveDocument.Sections)
    {
        Word.Range headerRange = section.Headers[Word.WdHeaderFooterIndex.wdHeaderFooterPrimary].Range;
        headerRange.Fields.Add(headerRange, Word.WdFieldType.wdFieldPage);
        headerRange.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight;
    }
    

    VB

    For Each section As Word.Section In Me.Application.ActiveDocument.Sections
        Dim headerRange As Word.Range = section.Headers(Word.WdHeaderFooterIndex.wdHeaderFooterPrimary).Range
        headerRange.Fields.Add(headerRange, Word.WdFieldType.wdFieldPage)
        headerRange.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphRight
    Next
    

    This code adds page numbers to the primary header of each section in the active document, aligning them to the right.

    0 comments No comments

  2. Kimberly Olaño 19,855 Reputation points Independent Advisor
    2025-12-13T23:27:57.6733333+00:00

    Thanks for sharing this Phillip! You’re Editing the Body, Not the Header/Footer

    If your cursor is in the document body, Page Number can appear grayed out even though headers exist.

    Do this:

    • Double-click at the very top or bottom of the page (don’t use Insert → Header, physically double-click the margin)
    • When you see “Header & Footer” appear:
    • Go to Header & Footer tab → Page Number

    If it activates here, the issue was focus-related. If Different First Page is checked, Word disables page numbering until configured correctly.

    Steps:

    • Double-click into the header/footer
    • On Header & Footer tab:
    • UNCHECK → Different First Page
    • Try inserting the page number again

    If you need a different first page:

    • Insert page number after disabling
    • Re-enable it afterward

    See if these help. If you need further assistance just let me know.

    Best regards,

    Kimberly

    0 comments No comments

  3. Stefan Blom 324K Reputation points MVP Volunteer Moderator
    2025-12-13T23:39:44+00:00

    If you see no page number formats at all, or a very small selection of formats, the reason is likely that the template which stores the predefined building blocks is damaged. In your Windows user profile, find the Built-in Building Blocks.dotx template and delete it.

    The folder is C:\Users\Your Windows User Name Here\AppData\Roaming\Microsoft\Document Building Blocks\1033\16 if you have a US English installation of Office.

    You can go directly to that folder from the Run dialog box (Windows logo key + R), if you type in %appdata%\Microsoft\Document Building Blocks\1033\16 and press Enter.

    User's image

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.