Copy link to clipboard
Copied
Hi:
I am trying to create a drop down list in my PDF form from a list in Microsoft Excel. I would like to paste this information rather than by entering each item one at a time. How can I accomplish this?
Copy link to clipboard
Copied
You cannot paste the list directly, but you an use a JavaScript to set your items. One option would be to run such a script in the JavaScript console. The method you would need to use is Field.setItems():
The documentation does have sample scripts that demonstrate how you would do that.
What I usually do is export the list from Excel as a CSV or tab separated text file, then load that file into a text editor and add all the information that is required to convert a text list into a valid script to set the items of a dropdown or a list box control.
Copy link to clipboard
Copied
Here's a link to a demo file that allows you to paste a list of items and have it automatically populate a combo box: http://acroscript.net/pdf/demos/comboPopulateTest.pdf
Once the combo box is populated, you can copy and paste it to your form. It's possible to change things to allow export values as well.
Copy link to clipboard
Copied
FormRouter.com offers a free set of tools for setting up form fields.
http://www.formrouter.com/tools/index.html
PDF Form Validation|Advanced Acroform Toolset|PDF Calendar|PDF File Upload|Required Dropdown
Copy link to clipboard
Copied
Another option in addition to those described is this tool I've developed: Custom-made Adobe Scripts: Acrobat -- Import Items from a Text File to a Combo-Box or List Field
It lets you import the items from a text file into a combo-box or a list-box field, including the option to embed the source file into the PDF (so that you can edit it directly and it will update the list) as well as to import not just the display values for the items but also their export values.