Would it be possible to count color word inside a Word documents. Let say there are two color word in my document. I need to count word which the color is Blue and I need to count word which the color is Red.
I only found "Count words in a Microsoft Word document by Fonts"
using below script:
Sub CountTypeface() Dim lngWord As Long Dim lngCountIt As Long Const Typeface As String = "Cambria"
For lngWord = 1 To ActiveDocument.Words.Count
'Ignore any document "Words" that aren't real words (CR, LF etc)
If Len(Trim(ActiveDocument.Words(lngWord))) > 1 Then
If ActiveDocument.Words(lngWord).Font.Name = Typeface Then
lngCountIt = lngCountIt + 1
End If
End If
Next lngWord
MsgBox "Number of " & Typeface & " words: " & lngCountIt
End Sub
Please advice.
Thank you.