Hi guys
I wanted to repeat/run this macro multiple times at a time.
Code:
Sub get_irf fnf()
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "(\<irf fnf=)(" & ChrW(8220) & _
"[A-Z 0-9]{1,}" & ChrW(8221) & "/\>)(*)^13"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
Selection.Cut
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "(\<irf fnfr=)(" & ChrW(8220) & _
"[A-Z 0-9]{1,}" & ChrW(8221) & _
"/\>)-(\<)irf fnf=(" & ChrW(8220) & _
"[A-Z 0-9]{1,}" & ChrW(8221) & "/\>)"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute
Selection.PasteAndFormat (wdFormatOriginalFormatting)
Selection.HomeKey Unit:=wdStory
End Sub
Can anyone help me out on this?
Thanks
Ganesan. G