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

app.execMenuItem("Open")

Usha
Registered: Nov 26 2007
Posts: 5

Hi,
I used the javascript code app.execMenuItem("Open") to display the open dialog box; but this code doesn't get executed. How can I get the open dialog box?
My designer version is 7.1 and my reader version is 8.
Regards,
Usha

lkassuba
ExpertTeam
Registered: Jun 28 2007
Posts: 3636
In Acrobat 8 the execution of menu items through the Javascript execMenuItem method is restricted to a short list of safe menus. You can see this list by creating a Button form field and in the Button field properties tab select the Actions tab and select "Execute a menu item" from the Select Action pulldown menu. The Open menu is not on this list. The execMenuItem method will silently fail if a named menu item is executed that is not on the safe menu list.
It's possible to execute menu items not on the safe list within a privileged context. For more information on this check out the Javascipt Reference manual at:
http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf

Lori Kassuba is an AUC Expert and Community Manager for AcrobatUsers.com.

Usha
Registered: Nov 26 2007
Posts: 5
Thank you so much for ur reply. Is there any work around to make this happen?
lkassuba
ExpertTeam
Registered: Jun 28 2007
Posts: 3636
The app.execMenuItem method may be executed, without restriction, in a privileged context, such as in the console or in a batch sequence. For folder JavaScript app.execMenuItem can be executed through a trusted function. For more information on this check out the Javascript for Acrobat API Reference at:
http://www.adobe.com/devnet/acrobat/pdfs/js_api_reference.pdf

Lori Kassuba is an AUC Expert and Community Manager for AcrobatUsers.com.