Word Count

  • Thread starter Thread starter Guest
  • Start date Start date
You can adapt and use this macro to insert the word count at the insertion
point:

Sub WordCount()
Dim NumWords
NumWords = ActiveDocument.ComputeStatistics(wdStatisticWords)
MsgBox ("The document contains " & NumWords & " words")
Selection.TypeText Text:="There are " & NumWords & " words in this
document."
End Sub
 
Yes. Insert a NumWords field where you want the word count to appear. Insert
the field using Insert | Field or by pressing Ctrl+F9 and typing NUMWORDS
between the braces.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Back
Top