How to avoid the first word of the paragraph and the capital word succeeding sentence terminal (.!?), if the intention is only to find capital word caught between words?
So there seems to be two issues?
1. The capital word at the start of the paragraph
2. The capital word that follows a punctuation and space
A round-about way of achieving the result adapted from Greg Maxey code.
Sub Highlight_capital()
'Adapted from - A basic Word macro coded by Greg Maxey
Dim oRng As Range
Set oRng = ActiveDocument.Range
With oRng.Find
Do While .Execute(FindText:="( [A-Z]*>)", MatchWildcards:=True)
oRng.HighlightColorIndex = wdYellow
oRng.Collapse 0
Loop
End With
Dim oRng1 As Range
Set oRng1 = ActiveDocument.Range
With oRng1.Find
Do While .Execute(FindText:="([.\!?]) [A-Z]*>", MatchWildcards:=True)
oRng1.HighlightColorIndex = wdNoHighlight
oRng1.Collapse 0
Loop
End With
End Sub
Issues.
If you plan to extract unique words, then noun clusters can pose a problem. (As in Output: Made it bold instead of highlight)
Output
To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template.
Is there an elegant solution?