Use Acrobat Action Wizard JavaScript to Insert PDF Pages
Question details
The user wants to use JavaScript in Adobe Acrobat's Action Wizard to open the Insert Pages command and add pages from another PDF.

- Product
- Adobe Acrobat Action Wizard
- Device & OS
- not provided
- Scenario
- The user is creating an Acrobat action and wants to insert pages from a document in another folder.
- Observed behavior
- The intended result is to open the Insert Pages dialog during the action and select a source PDF.
Make sure your Acrobat edition includes Action Wizard and that you can access both the destination PDF and the PDF containing the pages to insert. Check that Acrobat JavaScript is enabled in Preferences under JavaScript.
Open Insert Pages with Acrobat Action Wizard JavaScript
Use an Execute JavaScript action to open Acrobat's Insert Pages command while processing a PDF.
In Acrobat, open Tools > Action Wizard and select New Action. Depending on your version, Action Wizard may appear under All tools as Use guided actions.
In the action editor, add Execute JavaScript, select Specify Settings, and enter: app.execMenuItem("InsertPages");
Save the action, select it in Action Wizard, and run it on the destination PDF.
In the Insert Pages dialog, browse to the other folder, select the source PDF, and choose where to insert its pages.

Combine PDF Files and Work with Office Documents in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface and support for common Microsoft Office formats, making it easy to move existing files. Its PDF tools can help combine documents, but they do not run Acrobat Action Wizard scripts.

Frequently Asked Questions
What JavaScript opens Insert Pages in Acrobat?
Add app.execMenuItem("InsertPages"); to an Execute JavaScript step in Action Wizard. It opens the Insert Pages command for the current PDF.
Does the script automatically insert a PDF from another folder?
No. The command opens the Insert Pages dialog, where you must browse to the folder and select the source PDF.
Where do I add JavaScript to an Acrobat action?
Open Tools > Action Wizard, create or edit an action, add Execute JavaScript, and select Specify Settings to enter the code.
Can WPS Office run an Acrobat Action Wizard script?
No. Acrobat Action Wizard scripts are specific to Acrobat. WPS Office provides PDF tools for tasks such as combining documents, but it does not run that action.




