Hi,
I need to extract text from drop down form field, but I don’t really know do You support this and how could I extract text from this form?
Can You please help me and send me how I can do this?
I attached file with drop down form field, from this form I need to get to “First”, “Second” and “Third” text.
Thanks for your inquiry. Please use the following code to meet this requirement.
Document doc = new Document(getMyDir() + "DropDownFormField.docx"**);
FormField ff = doc.getRange().getFormFields().get(0);
int i = 0;
while (!ff.getResult().equals("")){
System.out.println(ff.getResult());
ff.setDropDownSelectedIndex(++i);
}
Hi,
thanks for answer, but I forgot to tell You that I use DocumentVisitor for visiting end extracting document text, so can You please send me some solution which use DocumentVisitor. Is FormField field node or other, how can I visit him?
Thanks for your inquiry. Yes, you can get handle to FormField inside DocumentVisitor.VisitFormField Method and execute the code from my previous post to get individual list items. Hope, this helps.
Best regards,
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.