I tried my luck, and I have no luck :-)
Help would be appreciated
Sub MFindReplace()
Dim aDoc As Document
Dim strFindText As String
Dim strReplaceText As String
With Selection
.HomeKey Unit:=wdStory
With Selection.Find
.Text = strFindText
.Replacement.Text = strReplaceText
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
For Each aDoc In Application.Documents
MsgBox aDoc.Name
Next aDoc
End With
End Sub
|