![]() |
#4
|
||||
|
||||
![]()
Your original post didn't mention anything about track changes. To work with those, you'd need to use a macro that, instead of replacing the found string, inserts the brackets before & after:
Code:
Sub Demo() Application.ScreenUpdating = False With ActiveDocument.Range With .Find .ClearFormatting .Replacement.ClearFormatting .Text = "<[0-9]{4}>" .Replacement.Text = "" .Forward = True .Wrap = wdFindStop .Format = False .MatchWildcards = True .Execute End With Do While .Find.Found .InsertBefore "(" .InsertAfter ")" .Collapse wdCollapseEnd .Find.Execute Loop End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
martinn4 | Word | 3 | 02-20-2014 03:52 AM |
can find and replace instances of the "enter" key? | snunicycler | Word | 7 | 05-02-2013 11:54 PM |
![]() |
AlexanderJohnWilley | Word VBA | 7 | 11-08-2012 10:15 AM |
![]() |
slayda | Word | 3 | 09-14-2011 02:16 PM |
![]() |
tollanarama | Word | 4 | 01-25-2011 02:19 AM |