We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Insert Legacy Text Form Field 'FORMTEXT' in Word Document Programmatically

How do I insert a text field?In word 2019, see the figure below
Snipaste_2019-12-10_17-41-29.png (7.7 KB)
The inserted content is shown in the attached document
Sample document.zip (10.9 KB)

@Anghost,

Please use the following code of Aspose.Words for .NET API to be able to programmatically insert legacy text form fields commonly known as ‘FORMTEXT’ in MS Word documents:

C# Code to Insert a Text Form Field in Word Document

Document doc = new Document("E:\\Temp\\in.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveToDocumentEnd();
FormField formText = builder.InsertTextInput("textField", TextFormFieldType.Regular, "", "Value of Text Field", 10);
doc.Save("E:\\Temp\\19.12.docx");

The above C# code will insert a ‘FORMTEXT’ field in Word document as shown in following screenshot:

Insert Legacy Text Form Field 'FORMTEXT' in Word Document Programmatically