Free Support Forum -

Extracting Form drop-down information

Help please

I am currently running an evaluation version of Aspose (Java) and it seems to perform all the functions I require. However, I am experiencing a parsing problem that I cannot solve.

The Word document I am processing contains both FieldTypes of FIELD_FORM_TEXT_INPUT & FIELD_FORM_DROP_DOWN. Either through parsing all nodes, selecting bookmarks, or iterating through the FormFields (FormFieldCollection) extracted as document.getRange().getFormFields(), I still cannot get at the drop-down information (either the item selected or the 1…n elements in the range).

So for the FIELD_FORM_TEXT_INPUT element, the getName() returns a FORMTEXT value, & the getText() or toTxt() methods return the value.

But for the FIELD_FORM_DROP_DOWN element, the getName() returns a FORMDROPDOWN
value, & the getText() or toTxt() methods nothing. Either the escape chars for the getText() or a 0 length string for the toTxt() method.

Any help would be most appreciated as this will be critical as to whether we purchase Aspose or not.

Stressed Tweety.


Thanks for your request. You should use getResult() method to get the selected value:

Hope this helps.

Best regards,

Ah…didn’t see that method.
Alexey, you’re a dood, thanks very much.