In this guide you’ll learn how to insert a footnote in Word using the .NET REST API. We’ll demonstrate the use of Aspose.Words for .NET Cloud SDK to add a Word footnote with the C# Low‑Code API, and explore the various footnote properties you can set before embedding it into your document.
Prerequisite
- Create an account and get API credentials
- Download Aspose.Words Cloud SDK for Dotnet to add a footnote in a Word file
- Setup C# solution project with the above SDK for creating endnote
Steps to Add Footnote in Word with C# REST API
- Instantiate the WordsApi object by providing the client ID and secret to insert endnote
- Read the input Word file and store it in a file stream
- Create the FootnoteInsert object by setting various properties
- Create the InsertFootnoteOnlineRequest method by setting the request, FootnoteInsert, and destination file name
- Call the InsertFootnoteOnline method to insert a footnote in the source Word file
- Get output stream from the result and save it on the disk
The aforementioned steps describe how to create a footnote in Word with C# REST API. Commence the process by loading the source Word file into the FileStream object and creating a footnote with the FootnoteInsert class. Use this footnote to create the InsertFootnoteOnlineRequest that you may use finally to create the footnote in the Word file using the InsertFootnoteOnline method.
Code for Creating Footnotes in Word with NET REST API
This example demonstrates how to insert a footnote in Word using the C# REST API. The FootnoteInsert class provides properties—such as Position, which can be linked to a range start node and a reference mark—to control footnote placement. After the call, the response’s Document.TryGetValue() method streams the resulting Word file, enabling you to save it directly to disk or store it in a database.
By now you’ve seen how to insert a footnote into a Word document using the .NET REST API. If you need to replace specific text instead, see our guide on Replace a Word in Word with NET REST API.