Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Bookmark.Sentences Property

Gets a Sentences collection that represents all the sentences in the Bookmark control.

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

Sentences Sentences { get; }

Property Value

Type: Microsoft.Office.Interop.Word.Sentences
A Sentences collection that represents all the sentences in the Bookmark control.

The following code example adds a Bookmark control with text to the document and then selects the first sentence in the bookmark.

This example is for a document-level customization.

private void BookmarkSentences()
{
    this.Paragraphs[1].Range.InsertParagraphBefore();

    Microsoft.Office.Tools.Word.Bookmark bookmark1 =
        this.Controls.AddBookmark(this.Paragraphs[1].Range,
        "bookmark1");
    bookmark1.Text = "This is the first sentence of bookmark text." +
        " And this is the second sentence.";
    bookmark1.Sentences.First.Select();
}

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