View Single Post
 
Old 10-06-2021, 09:52 AM
yacov yacov is offline Windows 10 Office 2016
Competent Performer
 
Join Date: Oct 2019
Posts: 146
yacov is on a distinguished road
Default

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
Reply With Quote