共用方式為


Bookmark.EndnoteOptions 屬性

取得 EndnoteOptions 物件,表示 Bookmark 控制項中的章節附註。

命名空間:  Microsoft.Office.Tools.Word
組件:  Microsoft.Office.Tools.Word (在 Microsoft.Office.Tools.Word.dll 中)

語法

'宣告
ReadOnly Property EndnoteOptions As EndnoteOptions
EndnoteOptions EndnoteOptions { get; }

屬性值

型別:Microsoft.Office.Interop.Word.EndnoteOptions
EndnoteOptions 物件,表示 Bookmark 控制項中的章節附註。

範例

下列程式碼範例將有文字的 Bookmark 控制項加入至第一個段落,然後將書籤內的章節附註起始數字設定為 5,並將數字樣式設定為 wdNoteNumberStyleArabic

這是示範文件層級自訂的範例。

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

.NET Framework 安全性

請參閱

參考

Bookmark 介面

Microsoft.Office.Tools.Word 命名空間