Using StoryRanges (as per the link) with Find/Replace in headers & footers is unreliable in multi-section documents. My preferred approach is along the lines of:
Sub Demo()
Application.ScreenUpdating = False
Dim Rng As Range, Sctn As Section, HdFt As HeaderFooter, Fnd As String, Rep As String
Fnd = "Find Text": Rep = "Replace Text"
With ActiveDocument
For Each Rng In .StoryRanges
Select Case Rng.StoryType
Case wdPrimaryFooterStory, wdFirstPageFooterStory, wdEvenPagesFooterStory, _
wdPrimaryHeaderStory, wdFirstPageHeaderStory, wdEvenPagesHeaderStory
Case Else
Call RngFndRep(Rng, Fnd, Rep)
End Select
Next
For Each Sctn In .Sections
For Each HdFt In Sctn.Headers
With HdFt
If .LinkToPrevious = False Then
Call RngFndRep(HdFt.Range, Fnd, Rep)
End If
End With
Next
For Each HdFt In Sctn.Footers
With HdFt
If .LinkToPrevious = False Then
Call RngFndRep(HdFt.Range, Fnd, Rep)
End If
End With
Next
Next
End With
Application.ScreenUpdating = True
End Sub
Sub RngFndRep(Rng As Range, Fnd As String, Rep As String)
With Rng.Find
.ClearFormatting
.Replacement.ClearFormatting
.Format = False
.Forward = True
.Wrap = wdFindContinue
.Text = Fnd
.Replacement.Text = Rep
.MatchCase = True
.MatchAllWordForms = False
.MatchWholeWord = False
.MatchWildcards = False
.Execute Replace:=wdReplaceAll
End With
End Sub