![]() |
|
#4
|
|||
|
|||
|
Is there a single sub that will do this for a list of words? Based on your code.
This code I was editing is not working: Code:
Set oDoc = ActiveDocument
aFind = Array(". ,", "house")
Set oRng = oDoc.range
For x = 0 To UBound(aFind)
With oRng.Find
.Text = aFind(x)
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
Do While .Execute(Forward:=True) = True: oRng.HighlightColorIndex = wdYellow: Loop
End With
Next x
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| highlight bar | freeriding | Project | 0 | 12-07-2018 05:25 AM |
Deleting all but one occurrence of text from a selection
|
paik1002 | Word VBA | 3 | 12-15-2015 05:17 PM |
VBA to highlight words if used too much
|
aolszewski | Word VBA | 3 | 11-23-2013 02:07 AM |
Mysterious bottom row occurrence
|
Ulodesk | Word Tables | 2 | 05-26-2013 02:44 PM |
| find - reading highlight - highlight all / highlight doesn't stick when saved | bobk544 | Word | 3 | 04-15-2009 03:31 PM |