Unable to find Range FormFields in html WORD document

Please advise why Aspose.Words can’t find the JURIS_a_343_C_1 text form field in the .html file in attached zip. Aspose.Words does find the form field if I use MS WORD to save the html file to docx format, as in the .docx file in attached zip. Aspose.Words still can’t find the form field if I save it from html file to docx file using Aspose.Words.
Here’s snippet of .Net code I am using:

Aspose.Words.Document docFile = new Aspose.Words.DocumentBuilder(sourceFilePath);
Aspose.Words.Fields.FormFieldCollection docFields = docFile.Range.FormFields;

Hi Janet,

Thanks for your inquiry. Please note that Aspose.Words tries to mimic the same behavior as MS Word do. Aspose.Words converts the MS Word documents to html (“Web Page, Filtered”). Please convert your document to HTML (“Web Page, Filtered”) by using MS Word and check the HTML output. Please find the list of Field Features supported upon HTML exporting/importing from here:

In case you are using an older version of Aspose.Words, I would suggest you please upgrade to the latest version (v13.3.0) from here:

I suggest you please read the memebers of HtmlSaveOptions class from here:

Please check the following code snippet for your kind reference.

Document doc = new Document(MyDir + "myform.docx");
HtmlSaveOptions option = new HtmlSaveOptions();
// Controls how text input form fields are saved to HTML or MHTML. Default value is false. 
option.ExportTextInputFormFieldAsText = false;
doc.Save(MyDir + "out.html", option);
Document docHtml = new Document(MyDir + "out.html");
foreach (FormField field in docHtml.Range.FormFields)
    if (field.TextInputType == TextFormFieldType.Regular)

Thanks for the information, but it doesn’t solve my original problem. I upgraded to the latest Aspose.Words version (v13.3.0) and retried test with original attached html file. myform.html is a MS WORD web page file (not-filtered) containing the JURIS_a_343_C_1 form field. I need to be able to load this file via Aspose.Words and find the form field(s) to replace content. Using the original snippet of code I included before, the Range.FormFields is empty, so Aspose.Words is not finding the form field in this html document. I had previously read the documentation you pointed me to, and it seems to imply that form fields should work in this type of html file. Please advise how I can get this done or fixed.

Hi Janet,

Thanks for your inquiry. Please note that there is an option to export form fields as dynamic fields in HTML as and tags or to export them as plain text.

HtmlSaveOptions option = new HtmlSaveOptions();
option.ExportTextInputFormFieldAsText = false;


Only and tags are imported back as fields. The input types that have direct Microsoft Word analogs are imported as working form fields.

Radio and image input elements are imported as image shapes and are non-clickable. Input elements attributed with hidden or disabled are not imported. I suggest you please read the memebers of HtmlSaveOptions class from here: