VB-AN-IZ
10-18-2016, 06:31 AM
Walking down a similar path to another thread which was recently solved:
http://www.vbaexpress.com/forum/showthread.php?57443-Highlight-All-Words-Containing-Capital-Letters
How could I highlight all words picked up in a spellcheck?
This is how to highlight all words containing a capital letter:
Sub ScratchMacro() '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
lbl_Exit:
Exit Sub
End Sub
Thanks!
http://www.vbaexpress.com/forum/showthread.php?57443-Highlight-All-Words-Containing-Capital-Letters
How could I highlight all words picked up in a spellcheck?
This is how to highlight all words containing a capital letter:
Sub ScratchMacro() '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
lbl_Exit:
Exit Sub
End Sub
Thanks!