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;
Do you have any idea why?
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:
Node tags = doc.GetChildNodes(NodeType.StructuredDocumentTag, true).ToArray();
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.
Thanks for such a quick response.
I guess that explains why the form field count was zero
Thanks for your help.
The issues you have found earlier (filed as WORDSNET-4010) have been fixed in this .NET update and this Java update.
This message was posted using Notification2Forum from Downloads module by aspose.notifier.