MyFlight
Technical User
- Feb 4, 2002
- 193
Does anyone know of a Simple way to run a FIND-REPLACE
under an IF-THEN statement?
Example:
Selection.Find.ClearFormatting
With Selection.Find
.Text = _
"UNIT 1A IS NOT SET UP"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=1
I need to do an Replace on the above text If-Found, Multiple times (the 1A changes upto 40A).
thank you
under an IF-THEN statement?
Example:
Selection.Find.ClearFormatting
With Selection.Find
.Text = _
"UNIT 1A IS NOT SET UP"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute
Selection.Delete Unit:=wdCharacter, Count:=1
I need to do an Replace on the above text If-Found, Multiple times (the 1A changes upto 40A).
thank you