共用方式為


DocumentBase.ReadabilityStatistics Property

Definition

Gets a ReadabilityStatistics collection that represents the readability statistics for the document.

public:
 property Microsoft::Office::Interop::Word::ReadabilityStatistics ^ ReadabilityStatistics { Microsoft::Office::Interop::Word::ReadabilityStatistics ^ get(); };
public Microsoft.Office.Interop.Word.ReadabilityStatistics ReadabilityStatistics { get; }
member this.ReadabilityStatistics : Microsoft.Office.Interop.Word.ReadabilityStatistics
Public ReadOnly Property ReadabilityStatistics As ReadabilityStatistics

Property Value

A ReadabilityStatistics collection that represents the readability statistics for the document.

Examples

The following code example adds text to the first paragraph in the document, and then displays a message that shows the number of words in the document by using the ReadabilityStatistics property. To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentReadabilityStatistics()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    this.Paragraphs[1].Range.Text = "This is sample text.";
    string Name = this.ReadabilityStatistics[1].Name.ToString();
    string Value = this.ReadabilityStatistics[1].ToString();
    MessageBox.Show(Name + ": " + Value);

}
Private Sub DocumentReadabilityStatistics()
    Me.Paragraphs(1).Range.InsertParagraphBefore()
    Me.Paragraphs(1).Range.Text = "This is sample text."
    Dim Index As Object = 1

    Dim Name As String = Me.ReadabilityStatistics.Item(Index).Name.ToString()
    Dim Value As String = Me.ReadabilityStatistics.Item(Index).Value.ToString()

    MessageBox.Show(Name & ": " & Value)
End Sub 

Applies to