ThisCalculator

Everyday

Word Find and Replace in Header Footer

Updated · Standard formula, shown below

Word Find and Replace in Header Footer

Yes, Microsoft Word’s Find and Replace can search and replace text inside headers and footers, but only if you open the header or footer area first. When the insertion point is in the header or footer, the Replace command works exactly as it does in the main document body.

How It Works

Headers and footers are separate sections of a Word document, even though they appear on the same page. When you press Ctrl+H or open the Replace dialog while the cursor is in the main text, Word only searches the body. To search the header or footer, you must first double‑click inside that area (or insert it via Insert > Header/Footer). Once the header/footer is active, the Replace dialog’s scope automatically changes to that region only.

The same applies to footnotes, endnotes, and text boxes – each is a separate “story” in Word’s internal structure. The Replace dialog only acts on the story that currently contains the cursor.

Step-by-Step: Replace in a Header or Footer

  1. Double-click inside the header or footer where the text you want to change appears. The main text will grey out, and the header/footer area becomes editable.
  2. Press Ctrl+H (Windows) or Cmd+H (Mac) to open the Find and Replace dialog.
  3. Enter the text you want to find in the “Find what” box, and the replacement text in the “Replace with” box.
  4. Click Replace All or use Find Next then Replace for individual changes.
  5. Close the dialog and click Close Header and Footer (or double-click the main document) to return to the body.

If the header/footer contains multiple sections (e.g., different first page, odd/even pages), you must repeat the process for each distinct header/footer. Word treats each of those as a separate story.

Why It Doesn’t Work from the Main Document

Many users try to replace a word that appears in both the body and the header, only to find the header text unchanged. This is not a bug – Word deliberately limits Find and Replace to the current editing context. The Replace dialog has a “Search” dropdown with options like “Down,” “Up,” or “All,” but these refer to the current story, not the whole document. There is no built-in “All Stories” option in the standard Find and Replace dialog.

Workarounds exist, such as using VBA macros to loop through all stories, but for a one-off change, manually opening the header and running Replace is the simplest and safest method.

Common Problems and Fixes

  • Text not found: Check that the header/footer is active. If the cursor is in the body, you are searching the wrong story.
  • Multiple headers/footers: If your document has different headers for different sections, you must repeat the replace in each. Use the “Previous Section” and “Next Section” buttons in the Header/Footer tab to navigate.
  • Formatting differences: Replace matches text, not formatting. If the header text has a different font or style, the replacement will inherit the formatting of the surrounding header text, not the body.
  • Fields and page numbers: If your header contains a page number field (e.g., “Page 1”), you cannot replace the number with plain text using Find and Replace – you must edit the field or use a different approach.
  • Linked headers: If headers are linked to previous sections, changing one may affect others. Unlink them first if you only want to change one section.

Alternatives: Using VBA for Multiple Headers

If you need to replace the same text across all headers and footers in a document, a simple VBA macro can do it in one go. Press Alt+F11 to open the Visual Basic Editor, insert a module, and paste a loop that iterates through StoryRanges. For example:

Sub ReplaceInHeaders()
    Dim rng As Range
    For Each rng In ActiveDocument.StoryRanges
        If rng.StoryType = wdPrimaryHeaderStory Or rng.StoryType = wdPrimaryFooterStory Then
            rng.Find.Execute FindText:="old text", ReplaceWith:="new text", Replace:=wdReplaceAll
        End If
    Next rng
End Sub

This is a more advanced solution, but it saves time when dealing with long documents with many sections. Note that this only affects the primary header/footer; you would need additional conditions for first-page or even/odd headers.

Frequently Asked Questions

Can I use Find and Replace in headers and footers at the same time as the body?

No, not with the standard dialog. You must run Replace separately for the body and for each header/footer. The dialog only acts on the active story.

Why does Replace All not find text in my header even though I can see it?

Because the cursor is in the main document. Double-click the header to activate it, then run Replace again. The header text is in a different layer of the document.

Will replacing in the header also change the same word in the footer?

No. The header and footer are separate stories. You must repeat the Replace in each area where the text appears.

How do I replace text in all headers of a multi-section document?

Open each header individually (using the Next/Previous Section buttons) and run Replace. Or use a VBA macro that loops through all header stories.

Can I replace formatting (like font or bold) in a header?

Yes, the Replace dialog has a “Format” button. Select the formatting you want to find and the formatting you want to apply. This works the same way in headers as in the body.

Does Find and Replace work in footnotes or endnotes?

Yes, but again you must click inside the footnote/endnote area first. Each footnote is a separate story, so you may need to repeat the replace for each one.

Limits and Best Practices

Find and Replace in headers is reliable for simple text swaps, but it has limitations. It cannot replace text inside a drawing canvas or a chart title unless you click into those objects first. It also won’t update page numbers or other dynamic fields – those are calculated by Word, not stored as static text.

For safety, always save your document before doing a Replace All, and review the changes with “Find Next” first if you are unsure. If you accidentally replace something, press Ctrl+Z to undo.

If you frequently work with headers and footers, consider using styles for header text. That way, you can change formatting across all headers by modifying the style, rather than using Find and Replace.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.