I’m using the latest version of Aspose Words (10.4.0.0) with the licence activated, and finding that when I load a document in with multiple form fields, the formfieldcollection count is zero. I have attached the sample document… Here is my code:
Aspose.Words.Document doc = new Aspose.Words.Document(@"C:\test\WordInput.docx");
FormFieldCollection formFields = doc.Range.FormFields;
Hi
Thanks for your request. Your document actually does not contain any Form Fields. In your document, you are using Content Controls (Structured Document Tags). That is why the collection of form fields is always empty.
In this case using the latest version of Aspose.Words you can get collection of StructuredDocumentTags using the following code:
Then you can loop through this collection and insert text. But there is one problem, currently there is no way to get SDT properties (like Title, Tag etc) so there is no way to identify SDT object.
Your request has been linked to the appropriate issue. You will be notified as soon as the feature which allows you to get properties of STD is supported.
Best regards,