What you want is Regular Expressions, which Word provides in the advanced section of its Find functionality.
Here's a quick sample:
Public Sub Test()
With ActiveDocument.Content.Find
.Text = "<[A-Z]{1,}>"
.MatchWildcards = True
.MatchCase = True
.Replacement.Font.Bold = True
.Execute Replace:=wdReplaceAll, Forward:=True, Wrap:=wdFindContinue
End With
End Sub
"<[A-Z]{1,}>" means the following:
- "<" means match starting at the beginning of a word
- "[]" means match one of the characters inside the brackets
- "[A-Z]" the A-Z part, when inside the brackets, means the uppercase letters A through Z
- "{1,}" means match the preceding at least once (in this case, an uppercase letter must occur at least once in a row)
- ">" means the match must end at the end of a word. The pattern would not match, for example "THIs" because the uppercase letters do not go to the end of the word.
One caveat you have to deal with is single-letter words - I and A will be bolded with this pattern scheme. You may find it easier to create a pattern that matches whole groups of uppercase words, but you will still have to find a way to deal with leading or trailing uppercase, single-letter words.
If you have questions, leave a comment and I can try to explain further.