Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-07-2018, 12:01 AM
ganesang ganesang is offline Need to repeat macro for multiple times Windows XP Need to repeat macro for multiple times Office 2016
Competent Performer
Need to repeat macro for multiple times
 
Join Date: Jul 2018
Posts: 170
ganesang is on a distinguished road
Default Need to repeat macro for multiple times

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

Last edited by macropod; 12-07-2018 at 03:17 PM. Reason: Added code tags
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to repeat macro for multiple times 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
Need to repeat macro for multiple times Print Format - Repeat Text From a Cell on Multiple Pages ChristopherHughes Excel 1 12-07-2014 08:31 PM
Need to repeat macro for multiple times 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

Other Forums: Access Forums

All times are GMT -7. The time now is 03:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft