I've made some amendments, but a lot of this is guess work.
Code
Sub HighlightWords()
Dim Word As Range
Dim WordCollection(2) As String
Dim Words As Variant
Dim sFldr As String
Dim oDoc As Document
Dim vFile
' Requires a reference to Microsoft Word xx Object Library
Dim appWd As Word.Application
Dim wrdDoc As Word.Document
' On Error Resume Next
Set appWd = GetObject(, "Word.Application")
On Error GoTo 0
If appWd Is Nothing Then Set appWd = New Word.Application
appWd.Visible = True
sFldr = "C:\username\My Documents\" '<- change this
vFile = Dir(sFldr & "*.*")
'Define list.
'If you add or delete, change value above in Dim statement.
WordCollection(0) = "very"
WordCollection(1) = "just"
WordCollection(2) = "of course"
Do While vFile <> ""
Set oDoc = Documents.Open(Filename:=sFldr & vFile)
'Set highlight color.
appWd.Options.DefaultHighlightColorIndex = wdYellow
'Clear existing formatting and settings in Find feature.
''/// I don't know where these selections are being made
appWd.Selection.Find.ClearFormatting
appWd.Selection.Find.Replacement.ClearFormatting
'Set highlight to replace setting.
appWd.Selection.Find.Replacement.Highlight = True
'Cycle through document and find words in collection.
'Highlight words when found.
For Each Word In appWd.ActiveDocument.Words
For Each Words In WordCollection
''///you need some code to select
With Selection.Find
.Text = Words
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
Next
Next
oDoc.Close SaveChanges:=False
vFile = Dir
Loop
End Sub
Display More