Bookmark.EndnoteOptions-Eigenschaft
Visual Studio 2005
Ruft ein EndnoteOptions-Objekt ab, das die Endnoten im Bookmark-Steuerelement darstellt.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word (in microsoft.office.tools.word.dll)
Assembly: Microsoft.Office.Tools.Word (in microsoft.office.tools.word.dll)
Im folgenden Codebeispiel wird dem ersten Absatz ein Bookmark-Steuerelement mit Text hinzugefügt. Anschließend wird die Nummer, mit der die Endnoten im Lesezeichen beginnen, auf fünf und das Format der Nummer auf wdNoteNumberStyleArabic festgelegt.
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); }