These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Button for Export

zeeshanhashmi
Registered: Jan 2 2008
Posts: 58

Hi

I want to place a button so that the user can Export the data.

Is that possible ?

try67
Expert
Registered: Oct 30 2008
Posts: 2398
Export in what way?

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

zeeshanhashmi
Registered: Jan 2 2008
Posts: 58
it should execute the Menu Item export.
Or can just export is CSV.
try67
Expert
Registered: Oct 30 2008
Posts: 2398
These are two very different things.
If you want to execute a menu item just use the app.execMenuItem() function. You will need to first find the name of it using app.listMenuItems().
Exporting to a CSV requires working with DataObjects. You create a new DO, set its contents and then export it to a local file (this requires user confirmation) and remove the DO.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com

zeeshanhashmi
Registered: Jan 2 2008
Posts: 58
thanks, so please tell me how to code the Export Button (menu item) in the Javascript ? and how this will work in Adobe Reader ?
try67
Expert
Registered: Oct 30 2008
Posts: 2398
This executes the Form Export Data menu item. However, I don't think it will work in Reader:

app.execMenuItem("AcroForm:FormData_ExportData");

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com