![]() |
|
#1
|
|||
|
|||
|
I need to create a macro that will turn on change tracking, delete all text that is formatted with red/underline, and then turns off change tracking. I have the macro working for one block of text at a time, but I'd like it to loop through the entire document.
I played a bit with Do Until loops, but this is my first time using Macros in Word and I suspect I am just not experienced enough to get it working... any help is appreciated. Code: Sub ClearRed() ' ' ClearRed Macro ' ' ActiveDocument.TrackRevisions = True Selection.Find.ClearFormatting With Selection.Find.Font .StrikeThrough = True .DoubleStrikeThrough = False .Color = wdColorRed End With With Selection.Find .Text = "" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = True .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute Selection.Delete Unit:=wdCharacter, Count:=1 ActiveDocument.TrackRevisions = False End Sub |
| Tags |
| loop, macro |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro to search for a particular word, copy the entire paragraph to a new document
|
Productivity | Word VBA | 2 | 10-25-2019 06:40 AM |
Delete entire paragraph after key word
|
jeffreybrown | Word | 2 | 07-27-2018 02:29 PM |
Need Word Macro to Delete Text
|
rsrasc | Word VBA | 4 | 04-18-2018 11:32 PM |
| Microsoft Word macro to find text, select all text between brackets, and delete | helal1990 | Word VBA | 4 | 02-05-2015 03:52 PM |
Macro to create new word doc and save the file using String found in the document
|
VBNation | Word VBA | 2 | 02-08-2013 07:14 AM |