Expand Minimize

DocumentBase.Endnotes Property

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Gets an Endnotes collection that represents all the endnotes in the document.

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

public Endnotes Endnotes { get; }

Property Value

Type: Microsoft.Office.Interop.Word.Endnotes
An Endnotes collection that represents all the endnotes in the document.

The following code example adds text to the first paragraph and then adds an endnote to the second word. To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentEndnotes()
{
    object text = "Sample endnote text.";
    this.Paragraphs[1].Range.InsertParagraphAfter();
    this.Paragraphs[1].Range.Text = "This is sample paragraph text.";
    this.Endnotes.Location = Word.WdEndnoteLocation.wdEndOfDocument;
    this.Endnotes.NumberStyle = Word.WdNoteNumberStyle.wdNoteNumberStyleLowercaseRoman;
    this.Endnotes.Add(this.Paragraphs[1].Range.Words[2].Characters[2], ref missing, ref text);

}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft