Create a Fillable Form in Word with NET REST API

This article describes the process to create a fillable form in Word with NET REST API. You will learn the process of using Aspose.Word for .NET Cloud SDK to create a form in Word with C# REST API. Multiple parameters are discussed that you can use to set the properties of the form fields.

Prerequisite

Steps to Make a Fillable Form in Word with C# REST API

  1. Instantiate the WordsApi object with a client ID and secret for creating form fields
  2. Load the target Word document into the file stream
  3. Create the FormFieldTextInput class object and set the properties of the form field
  4. Create the InsertFormFieldOnlineRequest by setting the desired parameters
  5. Call the InsertFormFieldOnline() method by providing the insert request object
  6. Save the output Word file from the task result

The above steps entail how to make a Word document fillable with C# REST API. Commence the process by loading the source Excel file and creating a FormFieldTextInput object by setting its properties. Use this field to instantiate the InsertFormFieldOnlineRequest and call the InsertFormFieldOnline() method for adding a field in the Word file.

Code to Make a Form in Word with C# Low Code API

This sample code exhibits how to make a fillable form in Word with C# Low Code API. We can set the destination of the fields in the file by setting the nodePath as we have set the section number to 1 and paragraph number to 3 using the zero-based indexes. Once the fields are added online, the result of the task is used to get the output file.

In this topic, we have learned to create fillable forms. To create a table in a Word file, refer to the following article: Create Table in Word with NET REST API.

 English