Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
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)
Syntax
'Declaration
ReadOnly Property ListParagraphs As ListParagraphs
ListParagraphs ListParagraphs { get; }
Property Value
Type: Microsoft.Office.Interop.Word.ListParagraphs
A ListParagraphs collection that represents all the numbered paragraphs in the Bookmark control.
Examples
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 Sub BookmarkListFormat()
Me.Paragraphs(1).Range.InsertParagraphBefore()
Dim Bookmark1 As Microsoft.Office.Tools.Word.Bookmark = _
Me.Controls.AddBookmark(Me.Paragraphs(1).Range, "Bookmark1")
Bookmark1.Text = "This is sample bookmark text." & vbLf & _
"This is the second paragraph of text."
Bookmark1.ListFormat.ApplyBulletDefault()
MessageBox.Show("Number of ListParagraphs in the bookmark: " _
& Bookmark1.ListParagraphs.Count.ToString)
End Sub
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);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.