Bookmark.ListParagraphs Property

 

Gets a ListParagraphs collection that represents all the numbered paragraphs in the Bookmark control.

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

ListParagraphs ListParagraphs { get; }

Property Value

Type: Microsoft.Office.Interop.Word.ListParagraphs

A ListParagraphs collection that represents all the numbered paragraphs in the Bookmark control.

The following code example adds a Bookmark control to the first paragraph and applies the default bulleted-list format to the bookmark.

This example is for a document-level customization.

private void BookmarkListFormat()
{
    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." + "\n" +
        "This is the second paragraph of text.";
    bookmark1.ListFormat.ApplyBulletDefault(ref missing);
    MessageBox.Show("Number of ListParagraphs in the bookmark: " +
        bookmark1.ListParagraphs.Count);
}
Return to top
Show: