Expand Minimize

Bookmark.ReadabilityStatistics Property

Gets a ReadabilityStatistics collection that represents the readability statistics for the Bookmark control.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

ReadabilityStatistics ReadabilityStatistics { get; }

Property Value

Type: Microsoft.Office.Interop.Word.ReadabilityStatistics
A ReadabilityStatistics collection that represents the readability statistics for the Bookmark control.

The following code example adds a Bookmark control with text to the first paragraph and then uses the ReadabilityStatistics property of the bookmark to display the number of words the bookmark contains in a message box.

This example is for a document-level customization.

private void BookmarkReadabilityStatistics()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();
    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.Text = "This is sample bookmark text.";

    object index = 1;
    MessageBox.Show("The number of words in bookmark1: " +
        bookmark1.ReadabilityStatistics.get_Item(ref index).Value.ToString());
}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft