Thread: [Solved] Select word by word
View Single Post
 
Old 01-21-2012, 06:45 AM
tinfanide tinfanide is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default

Self-solved.

Code:
Sub WordCount()

Dim n As Long
n = 0
For Each w In ActiveDocument.Words
    w.Select
    If UCase$(Left$(w, 1)) Like "[A-Z]" Then
    n = n + 1
    Debug.Print n
    End If
Next

End Sub
Codes similar to this.
Reply With Quote