Document.ComputeStatistics procedure builder

Document.ComputeStatistics (Word)

Returns a statistic based on the contents of the specified document.

Some of the constants listed above may not be available to you, depending on the language support (U.S. English, for example) that you have selected or installed.

ComputeStatistics (Statistic, IncludeFootnotesAndEndnotes)

MsgBox ActiveDocument.ComputeStatistics(Statistic:=wdStatisticWords, _ 
 IncludeFootnotesAndEndnotes:=True) & " words"

Arguments

The following argument is required

Statistic (WdStatistic) - The statistic to compute.


Possible Values are

wdStatisticCharacters Count of characters.
wdStatisticCharactersWithSpaces Count of characters including spaces.
wdStatisticFarEastCharacters Count of characters for Asian languages.
wdStatisticLines Count of lines.
wdStatisticPages Count of pages.
wdStatisticParagraphs Count of paragraphs.
wdStatisticWords Count of words.

Optional arguments

The following argument is optional

IncludeFootnotesAndEndnotes - True to include footnotes and endnotes when computing statistics. If this argument is omitted, the default value is False