Other PDF Issues

How to Fix Adobe Acrobat Crash on JavaScript CloseDoc in Action Wizard

Anum MushtaqAnum Mushtaq Nov 24, 2026 869 views

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.

Fixing Adobe Acrobat Crash on JavaScript CloseDoc in Action Wizard
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.
Before you start

Ensure you have saved all open PDF documents and backed up your existing custom action scripts before modifying JavaScript codes or repairing the installation.

Solution 1Recommended

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.

1
Open Action Wizard

Navigate to 'Tools' in Adobe Acrobat and select 'Action Wizard'.

2
Edit Your Custom Action

Select the custom action that is causing the crash and click 'Edit' to modify its steps.

3
Remove the Script

Locate the JavaScript execution step containing `this.closeDoc(true);` and delete or modify the script to remove this specific command.

4
Save and Run

Save your updated action. Run the action and allow the default interface to manage file closures automatically without script interference.

Remove the JavaScript CloseDoc Command
Acrobat DC File Closure Bug: Because Acrobat DC may leave the final file in a batch open, simply ignore this behavior and close the final file manually after the Action Wizard completes its sequence.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS website to download and install the free software suite.
  2. 2. Open the PDF Toolkit: Launch WPS Office and click on the 'PDF' tab on the home screen to access PDF tools.
  3. 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.
Seamlessly handles PDF viewing, editing, and batch processing without application crashes.Highly compatible with standard PDF formats and Microsoft Office files.Lightweight application that requires fewer system resources for stable performance.User-friendly interface requiring no advanced scripting knowledge.
microsoft office alternative - wps office

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.