w:endnote (Endnote Definition)
Defines a single endnote, including its unique ID, optional type, and body content paragraphs.
Parent elements
Child elements
Description
w:endnote represents a single endnote in the Endnotes part. It is the endnote counterpart to w:footnote. Each endnote has a unique integer ID referenced by w:endnoteReference in the main document body.
It is defined in ECMA-376 Part 1 §17.11.2.
Attributes
| Attribute | Type | Possible Values | Description |
|---|---|---|---|
w:id |
xsd:integer |
Any integer | Unique identifier. Negative IDs (-1, 0) are reserved for separator entries. |
w:type |
ST_FtnEdn |
normal, separator, continuationSeparator, continuationNotice |
Type of endnote. Omitting w:type is equivalent to normal. |
w:type Values
| Value | Description |
|---|---|
normal |
A regular endnote (default). |
separator |
Defines the separator rendered before the endnote area. |
continuationSeparator |
Separator for continued endnotes. |
continuationNotice |
Optional notice when endnotes continue on the next page. |
Examples
<w:endnote w:id="1">
<w:p>
<w:pPr><w:pStyle w:val="EndnoteText"/></w:pPr>
<w:r>
<w:rPr><w:rStyle w:val="EndnoteReference"/></w:rPr>
<w:endnoteRef/>
</w:r>
<w:r><w:t xml:space="preserve"> Source text for this endnote.</w:t></w:r>
</w:p>
</w:endnote>
using DocumentFormat.OpenXml.Wordprocessing;
var endnote = new Endnote { Id = 1 };
var para = new Paragraph();
para.AppendChild(new ParagraphProperties(
new ParagraphStyleId { Val = "EndnoteText" }
));
var refRun = new Run();
refRun.AppendChild(new RunProperties(
new RunStyle { Val = "EndnoteReference" }
));
refRun.AppendChild(new EndnoteReferenceMark());
para.AppendChild(refRun);
var textRun = new Run();
textRun.AppendChild(new Text(" Source text for this endnote.")
{
Space = SpaceProcessingModeValues.Preserve
});
para.AppendChild(textRun);
endnote.AppendChild(para);
Notes
w:endnoteRefinside the endnote body renders the reference mark within the endnote text area.- Endnote numbering is independent of footnote numbering; both start at 1 (or the value in
w:endnotePr). - Built-in styles
EndnoteTextandEndnoteReferenceapply correct formatting automatically.