A family of Microsoft word processing software products for creating web, email, and print documents.
This should get you started:
Sub HighlightValuesOver30000()
Dim rng As Range
Dim findRange As Range
Dim numValue As Double
' Start from the beginning of the document
Set rng = ActiveDocument.Content
rng.Find.ClearFormatting
rng.Find.Replacement.ClearFormatting
' Search for numbers (including commas and decimals)
With rng.Find
.Text = "<[0-9,\.]{1,}>"
.MatchWildcards = True
.Forward = True
.Wrap = wdFindStop
End With
' Loop through all matches
Do While rng.Find.Execute
Set findRange = rng.Duplicate
' Remove commas for numeric conversion
On Error Resume Next
numValue = CDbl(Replace(findRange.Text, ",", ""))
On Error GoTo 0
' Check if number is greater than 30000
If numValue > 30000 Then
findRange.HighlightColorIndex = wdTurquoise
End If
' Move to next match
rng.Collapse wdCollapseEnd
Loop
MsgBox "Highlighting complete.", vbInformation
End Sub