Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There should be a better way, but I cannot find it:</p> <pre><code>Sub ReplaceHeaderFooterandBody(findString As String, replaceString As String) ActiveDocument.Windows(1).View.SeekView = wdSeekPrimaryHeader With Selection.Find .Text = findString .Replacement.Text = replaceString .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll ActiveDocument.Windows(1).View.SeekView = wdSeekPrimaryFooter With Selection.Find .Text = findString .Replacement.Text = replaceString .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll ActiveDocument.Windows(1).View.SeekView = wdSeekMainDocument With Selection.Find .Text = findString .Replacement.Text = replaceString .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Replace:=wdReplaceAll End Sub </code></pre> <p>It appears that Word refuses to search an area unless it's your current view (which is ridiculous in my opinion). You cannot even search the entire document including headers &amp; footers at once through the UI. <a href="http://social.msdn.microsoft.com/Forums/en-us/isvvba/thread/b5cc0421-8482-4cee-b70a-b84c4958f9db" rel="nofollow">Here's a question</a> at another site that seemed to get the same answer. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload