I am using latest version of Aspose.words java product family and I am getting an fieldStart node on parsing an sample .docx file which contains form fields and I have attached that document for your Reference.FormFieldListTest.zip (9.8 KB)
I am trying to get the formField froim the current fieldStart node like fieldStart.getFormField() similar to getting field using fieldStart.getField() but I could not find any API for it
So, i tried using getRange() API to get the formField as
I am exception to get the first Form field within that range but it is returning null.
I also tried getting parentNode which should be run but it is returning paragraph.
I have attached my code for your referral :::
FieldStart fieldStart = (FieldStart)this.node;
FormField formField = fieldStart.getParentNode().getRange().getFormFields().get(0);
int count = fieldStart.getParentNode().getRange().getFormFields().getCount();
It should obviously forgive count 1 as there is only one FormField inside run of the Paragraph but it gives count of 4 which is formField of entire paragraph. I expect fieldStart.getParentNode() to give run node but it gives paragraph. Is this correct ?
1)I need an Api to get FormField from FieldStart
Or else is there a way to get FormField from fieldStart using any other api like getRange(). I tried using getRange() but it still gives paragraph. I think it is wrong or is it the intended behavior then please explain me how ??
I dont want to get if from doc.getRange().getFormFields.get(int index) but from FieldStart
Please it is urgent!!!