Try:
![]()
Sub SearchHeader() Dim i As Long, j As Long, StrPref As String StrPref = "Procedure No. " With ActiveDocument For i = 1 To .Sections.Count With .Sections(i) For j = 1 To 3 With .Headers(j).Range With .Find .Text = StrPref & "[!^13]@^13" .Forward = True .MatchWildcards = True .Execute End With If .Find.Found = True Then MsgBox Mid(.Text, Len(StrPref) + 1, Len(.Text) - Len(StrPref) - 1) End If End With Next End With Next End With End Sub
Bookmarks