Condividi tramite


Proprietà Bookmark.ListFormat

Ottiene un oggetto ListFormat che rappresenta tutte le caratteristiche di formattazione degli elenchi di un controllo Bookmark.

Spazio dei nomi:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)

Sintassi

'Dichiarazione
ReadOnly Property ListFormat As ListFormat
ListFormat ListFormat { get; }

Valore proprietà

Tipo: Microsoft.Office.Interop.Word.ListFormat
Oggetto ListFormat che rappresenta tutte le caratteristiche di formattazione degli elenchi di un controllo Bookmark.

Esempi

Nell'esempio di codice seguente viene aggiunto un controllo Bookmark al primo paragrafo e viene applicato al segnalibro il formato predefinito di elenchi puntati.

Questo esempio è valido per una personalizzazione a livello di documento.

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);
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

Bookmark Interfaccia

Spazio dei nomi Microsoft.Office.Tools.Word