![]() |
|
#1
|
|||
|
|||
|
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
Thanks Ganesan. G Last edited by macropod; 12-07-2018 at 03:17 PM. Reason: Added code tags |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Mail Merge Repeat Record a certain number of times
|
stacey_e | Mail Merge | 7 | 07-07-2023 01:27 AM |
| Repeat macro until no more fields | ChrisJ83 | Word VBA | 2 | 01-20-2016 04:55 AM |
Print Format - Repeat Text From a Cell on Multiple Pages
|
ChristopherHughes | Excel | 1 | 12-07-2014 08:31 PM |
How to repeat multiple .jpg's over again in Custom Slide show
|
pbyrescue | PowerPoint | 1 | 04-03-2014 12:40 PM |
| Repeat formula 5 times and repeat? | Jenny345 | Excel | 4 | 06-14-2013 04:37 PM |