w:endnoteRef (Endnote Reference Mark)
Empty element that renders the auto-numbered endnote reference mark within the body of the endnote itself.
Parent elements
Description
w:endnoteRef is an empty inline element placed inside a run within the endnote body (endnotes.xml). It renders as the auto-generated endnote number (or symbol) that labels the endnote — matching the superscript mark in the main document.
It is defined in ECMA-376 Part 1 §17.11.6.
w:endnoteRef has no attributes and no content. It is the endnote counterpart to w:footnoteRef.
Examples
<w:endnote w:id="1">
<w:p>
<w:r>
<w:rPr><w:rStyle w:val="EndnoteReference"/></w:rPr>
<w:endnoteRef/>
</w:r>
<w:r><w:t xml:space="preserve"> Endnote text goes here.</w:t></w:r>
</w:p>
</w:endnote>
using DocumentFormat.OpenXml.Wordprocessing;
var run = new Run();
run.AppendChild(new RunProperties(
new RunStyle { Val = "EndnoteReference" }
));
run.AppendChild(new EndnoteReferenceMark());
Notes
w:endnoteRefappears inside the endnote body (inendnotes.xml). For the reference mark in the main document text, usew:endnoteReference.- Every regular
w:endnoteshould include exactly onew:endnoteRefat the beginning of its first paragraph. - Apply the
EndnoteReferencecharacter style to the run for correct superscript formatting.