With either set of code, modifications to allow a single prompt per folder are fairly simple. With mine, for example, to do that and process any first-page & even-page headers as well, change the UpdateDocumentHeaders sub to:
Code:
Sub UpdateDocumentHeaders()
Application.ScreenUpdating = False
Dim strFolder As String, strFile As String, wdDoc As Document
Dim strFnd As String, strRep As String, wdStory(), i As Long
strFolder = GetFolder
If strFolder = "" Then Exit Sub
strFnd = InputBox("Text to Replace", "Old String")
strFile = Dir(strFolder & "\*.doc", vbNormal)
strRep = InputBox("Replacement Text", "New String")
wdStory = Array(wdPrimaryHeaderStory, wdFirstPageHeaderStory, wdEvenPagesHeaderStory)
While strFile <> ""
Set wdDoc = Documents.Open(FileName:=strFolder & "\" & strFile, AddToRecentFiles:=False, Visible:=False)
With wdDoc
On Error Resume Next
For i = LBound(wdStory) To UBound(wdStory)
MsgBox wdStory(i)
With .StoryRanges(wdStory(i)).Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = strFnd
.Replacement.Text = strRep
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = True
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
End With
Next
On Error GoTo 0
.Close SaveChanges:=True
End With
strFile = Dir()
Wend
Set wdDoc = Nothing
Application.ScreenUpdating = True
End Sub