Compartilhar via


ReadabilityStatistics Collection Object

Word Developer Reference

A collection of ReadabilityStatistic objects for a document or range.

Remarks

Use the ReadabilityStatistics property to return the ReadabilityStatistics collection. The following example enumerates the readability statistics for the selection and displays each one in a message box.

Visual Basic for Applications
  For each rs in Selection.Range.ReadabilityStatistics
    Msgbox rs.Name & " - " & rs.Value
Next rs

Use ReadabilityStatistics(Index), where Index is the index number, to return a single ReadabilityStatistic object. The statistics are ordered as follows: Words, Characters, Paragraphs, Sentences, Sentences per Paragraph, Words per Sentence, Characters per Word, Passive Sentences, Flesch Reading Ease, and Flesch-Kincaid Grade Level. The following example returns the word count for the active document.

Visual Basic for Applications
  Set myRange = ActiveDocument.Content
wordval = myRange.ReadabilityStatistics(1).Value
Msgbox wordval

See Also