---
title: "Working with Footnote and Endnote"
---


Aspose.Words also provides some classes, methods and properties for working with footnotes and endnotes.

## Insert Endnote and Set Numbering Options

If you want to insert footnote or endnote in Word document, please use [insertFootnote](https://reference.aspose.com/words/nodejs-net/aspose.words/documentbuilder/insertfootnote/) method. This method inserts a footnote or endnote into the document.

[EndnoteOptions](https://reference.aspose.com/words/nodejs-net/aspose.words.notes/endnoteoptions/) and [FootnoteOptions](https://reference.aspose.com/words/nodejs-net/aspose.words.notes/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:

{{< gist "aspose-words-gists" "7717b3a13cf86fabceb5860693073506" "set-endnote-options.js" >}}

## Set Number of Footnote Layout Columns

You can set the number of footnote layout columns using the [columns](https://reference.aspose.com/words/nodejs-net/aspose.words.notes/footnoteoptions/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:

{{< gist "aspose-words-gists" "7717b3a13cf86fabceb5860693073506" "set-footnote-columns.js" >}}

## Set the Position of Footnote and EndNote

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:

{{< gist "aspose-words-gists" "7717b3a13cf86fabceb5860693073506" "set-footnote-and-endnote-position.js" >}}

------ 

## FAQ

1. **Q:** How do I insert a footnote or endnote with DocumentBuilder?  
   **A:** Use the `insertFootnote` method of `DocumentBuilder`. Pass the `FootnoteType.Footnote` or `FootnoteType.Endnote` enum value and the footnote text. The method returns a `Footnote` object that you can further customize.

2. **Q:** How can I change the numbering format of footnotes or endnotes?  
   **A:** Create an instance of `FootnoteOptions` or `EndnoteOptions` and set its `numberStyle` property (e.g., `NumberStyle.LowerRoman`). Assign the options object to the document’s `footnoteOptions` or `endnoteOptions` property before inserting notes.

3. **Q:** How do I set the number of columns for footnote layout?  
   **A:** Set the `columns` property of `FootnoteOptions`. A value of `0` lets Word decide based on the page layout; any positive integer forces that many columns.

4. **Q:** How can I control where footnotes and endnotes appear in the document?  
   **A:** Use the `position` property of `FootnoteOptions` (`FootnotePosition.Bottom` or `FootnotePosition.BeneathText`) and the `position` property of `EndnoteOptions` (`EndnotePosition.EndOfSection` or `EndnotePosition.EndOfDocument`). Apply the options to the document before adding notes.

5. **Q:** I have HTML that contains `<sup>` endnote tags—how can I convert them to Word endnotes?  
   **A:** Load the HTML into a `Document`, then iterate through the `Paragraph` nodes looking for `Superscript` runs that contain the endnote marker. Replace each marker with an `Endnote` using `DocumentBuilder.insertFootnote(FootnoteType.Endnote, “text”)`. Finally, save the document in the desired format.