How to Fix Adobe Acrobat Crash on JavaScript CloseDoc in Action Wizard
Question details
The user needs to fix an issue where Adobe Acrobat crashes when using a JavaScript command to close documents in the Action Wizard, and resolve problems with custom actions not saving.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Running or saving automated batch tasks using the Action Wizard with custom JavaScript.
- Observed behavior
- The Action Wizard fails to save custom actions properly. Additionally, executing the this.closeDoc(true); script to close PDFs successfully closes the file but immediately causes the Acrobat application to crash.
Ensure you have saved all open PDF documents and backed up your existing custom action scripts before modifying JavaScript codes or repairing the installation.
Remove the JavaScript CloseDoc Command
Prevent application crashes by letting the Action Wizard handle file closures natively instead of forcing it with custom JavaScript.
There is a known, long-standing bug in Adobe Acrobat DC where the application keeps the last processed file open during automated actions. Forcing the document to close using the `this.closeDoc(true);` script disrupts this process and results in a sudden application crash.
Navigate to 'Tools' in Adobe Acrobat and select 'Action Wizard'.
Select the custom action that is causing the crash and click 'Edit' to modify its steps.
Locate the JavaScript execution step containing `this.closeDoc(true);` and delete or modify the script to remove this specific command.
Save your updated action. Run the action and allow the default interface to manage file closures automatically without script interference.

Repair the Adobe Acrobat Installation
Use the built-in repair tool to fix underlying software issues preventing the Action Wizard from saving custom actions properly.
Try WPS Office for Stable and Efficient PDF Management
If you are experiencing frequent crashes or unresolved bugs in your current PDF software, consider switching to WPS Office. It provides a robust, built-in PDF toolkit that handles document management smoothly, without the need for complex scripting.
- 1. Download WPS Office: Visit the official WPS website to download and install the free software suite.
- 2. Open the PDF Toolkit: Launch WPS Office and click on the 'PDF' tab on the home screen to access PDF tools.
- 3. Manage Documents Safely: Use the intuitive built-in tools to merge, split, edit, and manage your PDFs efficiently without relying on error-prone JavaScript.

Frequently Asked Questions
Why does Adobe Acrobat crash when I use this.closeDoc()?
Acrobat crashes due to a known bug in Acrobat DC where the software attempts to keep the last processed file open. Forcing the document to close via JavaScript disrupts the automated sequence, causing the application to crash.
How do I fix Action Wizard not saving my custom actions?
You can resolve saving issues by repairing your Adobe Acrobat installation. Navigate to the 'Help' menu at the top of the application window and select 'Repair Installation'.
Is there a way to automatically close all files in Action Wizard without crashing?
Currently, the safest method is to allow the Action Wizard to handle file closures natively. While it may leave the final document open due to an existing bug, it prevents the application from crashing. You can manually close the last file once the batch process is complete.




