Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
What is this page about?
This page explains how to work with footnotes and endnotes.
Aspose.Words also provides some classes, methods and properties for working with footnotes and endnotes.
If you want to insert footnote or endnote into Word document, please use the InsertFootnote method. This method inserts a footnote or endnote into the document.
EndnoteOptions and FootnoteOptions classes represent numbering options for footnote and endnote.
The following code example shows how to insert endnote into the document and set its numbering options:
You can set the number of footnote layout columns using the Columns property. If this property has the value of 0, the footnotes area is formatted with a number of columns based on the number of columns on the displayed page.
The following code example shows how to set the number of columns for footnote layout:
The footnote position can be at the bottom of each page or beneath the text on each page. The endnote position can be at the end of the section or at the end of the document.
The following code example shows how to set the position of footnote and endnote:
Q: How do I insert a footnote or an endnote with DocumentBuilder?
A: Use the DocumentBuilder.InsertFootnote method and specify the FootnoteType enumeration value (FootnoteType.Footnote or FootnoteType.Endnote). The method returns a Footnote object that you can populate with text.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Insert a footnote
Footnote footnote = builder.InsertFootnote(FootnoteType.Footnote, true);
footnote.AppendChild(new Run(doc, "This is a footnote."));
// Insert an endnote
Footnote endnote = builder.InsertFootnote(FootnoteType.Endnote, true);
endnote.AppendChild(new Run(doc, "This is an endnote."));
Q: How can I change the numbering style of footnotes or endnotes?
A: Modify the NumberStyle property of FootnoteOptions or EndnoteOptions on the Document object. Supported styles include Arabic, UpperRoman, LowerRoman, UpperLetter, and LowerLetter.
doc.FootnoteOptions.NumberStyle = NumberStyle.UpperRoman;
doc.EndnoteOptions.NumberStyle = NumberStyle.LowerLetter;
Q: What property controls the number of columns used for footnote layout?
A: The FootnoteOptions.Columns property defines how many columns the footnote area uses. Setting it to 0 lets Word decide based on the page layout.
doc.FootnoteOptions.Columns = 2; // Two‑column footnote area
Q: How do I set where footnotes and endnotes appear in the document?
A: Use the FootnoteOptions.Position and EndnoteOptions.Position properties. For footnotes you can choose FootnotePosition.BottomOfPage or FootnotePosition.BeneathText. For endnotes you can choose EndnotePosition.EndOfSection or EndnotePosition.EndOfDocument.
doc.FootnoteOptions.Position = FootnotePosition.BottomOfPage;
doc.EndnoteOptions.Position = EndnotePosition.EndOfDocument;
Q: Can I convert an existing footnote to an endnote (or vice‑versa) without recreating it?
A: Retrieve the Footnote node, change its FootnoteType property, and optionally move it to the appropriate collection. The change updates the numbering and placement automatically.
// Convert the first footnote to an endnote
Footnote footnote = (Footnote)doc.GetChild(NodeType.Footnote, 0, true);
footnote.FootnoteType = FootnoteType.Endnote;
// After changing the type, the document will treat it as an endnote
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.