![]() |
#2
|
||||
|
||||
![]()
Your macro isn't far off being correct. Try:
Code:
Sub ListChange() Application.ScreenUpdating = False Dim MyList() As String, i As Long Options.DefaultHighlightColorIndex = wdYellow MyList = Split("additionally,ah,almost,big,can be,could,could be,generally speaking,he,in,it,it is,low,many,may,might,most,plenty,she,should,some, these,they,this is,we,with", ",") With ActiveDocument.Range.Find .ClearFormatting .Replacement.ClearFormatting .Replacement.Highlight = True .Replacement.Text = "^&" .MatchWholeWord = True For i = 0 To UBound(MyList()) .Text = MyList(i) .Execute Replace:=wdReplaceAll Next End With Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to find (highlight) two and more words in a list of 75k single words in Word 2010 | Usora | Word | 8 | 05-29-2018 03:34 AM |
![]() |
bakerkr | Word VBA | 4 | 10-19-2017 02:23 PM |
![]() |
JSC6 | Word VBA | 1 | 09-30-2014 08:22 PM |
![]() |
Daniel_NYC | Word VBA | 1 | 04-21-2014 03:35 PM |
![]() |
aolszewski | Word VBA | 3 | 11-23-2013 02:07 AM |