Share via


Bookmark.EndnoteOptions, propriété

Obtient un objet EndnoteOptions représentant les notes de fin du contrôle Bookmark.

Espace de noms :  Microsoft.Office.Tools.Word
Assembly :  Microsoft.Office.Tools.Word (dans Microsoft.Office.Tools.Word.dll)

Syntaxe

'Déclaration
ReadOnly Property EndnoteOptions As EndnoteOptions
EndnoteOptions EndnoteOptions { get; }

Valeur de propriété

Type : Microsoft.Office.Interop.Word.EndnoteOptions
Objet EndnoteOptions représentant les notes de fin du contrôle Bookmark.

Exemples

L'exemple de code suivant ajoute au premier paragraphe un contrôle Bookmark avec du texte, puis attribue à la première note de fin du signet le numéro 5, auquel il donne le style wdNoteNumberStyleArabic.

Cet exemple illustre une personnalisation au niveau du document.

Private Sub BookmarkEndnoteOptions()

    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."
    Bookmark1.EndnoteOptions.NumberStyle = Word.WdNoteNumberStyle.wdNoteNumberStyleArabic
    Bookmark1.EndnoteOptions.StartingNumber = 5
    Bookmark1.Endnotes.Location = Word.WdEndnoteLocation _
        .wdEndOfSection
    Me.Endnotes.Add(Bookmark1.Range, "", "This is the text of the Endnote")

End Sub
private void BookmarkEndnoteOptions()
{
    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.";
    bookmark1.EndnoteOptions.NumberStyle = 
        Word.WdNoteNumberStyle.wdNoteNumberStyleArabic;
    bookmark1.EndnoteOptions.StartingNumber = 5;
    bookmark1.Endnotes.Location = Word.WdEndnoteLocation
        .wdEndOfSection;
    object Reference = "";
    object Text = "This is the text of the Endnote.";

    this.Endnotes.Add(bookmark1.Range, ref Reference, ref Text);
}

Sécurité .NET Framework

Voir aussi

Référence

Bookmark Interface

Microsoft.Office.Tools.Word, espace de noms