Microsoft Word Suite
Command: compute statistics
Returns a statistic based on the contents of the specified document. You must use the compute
statistics command before you can access the readability statistics for the document
compute statistics document Required. An expression that returns a document object.
statistic enumeration Required. The statistic. Can be one of the following: statistic characters,
statistic characters with spaces, statistic east asian characters, statistic lines, statistic pages,
statistic paragraphs, or statistic words.
[include footnotes and endnotes Boolean] Optional. True to include footnotes and endnotes
when computing statistics. If this argument is omitted, the default value is false.
This example displays the number of words and characters in the first paragraph of Report.doc.
set wordCount to compute statistics document "Report.doc" statistic ¬
set charCount to compute statistics document "Report.doc" statistic ¬
display dialog "The document contains " & wordCount & " words and a total ¬
of " & charCount & " characters."
This example displays the number of words in the active document, including footnotes.
display dialog "" & (compute statistics active document statistic ¬
statistic words with include footnotes and endnotes true) & " words."
Converts a multiple-level list to a single-level list, or vice versa.
convert list template Required. An expression that returns a list template object.
[level integer] Optional. The level to use for formatting the new list. When this argument is used
to convert a multiplelevel list to a singlelevel list, it can be a number from 1 through 9. When
this argument is used to convert a singlelevel list to a multiplelevel list, 1 is the only valid
value. If this argument is omitted, 1 is used.
You cannot use the convert command on a list template that is derived from the list galleries object.
This example converts the first list template in the active document. If the list template is multiple-
level, it becomes single-level, or vice versa.
convert list template 1 of active document