How to Open the Find Dialog Automatically When a PDF Opens
Question details
The user wants the Find dialog to appear automatically whenever a specific PDF document is opened.

- Product
- Adobe Acrobat
- Device & OS
- not provided
- Scenario
- Configuring a specific PDF file so that users are immediately prompted to search for text upon opening the document.
- Observed behavior
- By default, PDFs do not launch the Find dialog automatically. A document-level JavaScript must be embedded to trigger this action upon opening.
Ensure you have a PDF editor that supports adding document-level JavaScript, such as Adobe Acrobat Pro.
Add Document-Level JavaScript to Your PDF
Use Adobe Acrobat's JavaScript tool to execute the Find command automatically when the document loads.
Because there is no global application preference to apply this behavior to all PDFs simultaneously, you must add a small script to each specific PDF file where you want the Find dialog to launch automatically.
Open your PDF in Adobe Acrobat. Navigate to the 'Tools' menu, select 'JavaScript', and then click on 'Document JavaScripts'.
In the dialog box, type a recognizable name for the script, such as 'scripts', and click the 'Add' button.
In the JavaScript editor window, delete any default text and enter the following code exactly: app.execMenuItem("Find"); Then click 'OK' and close the JavaScript window.
Save your PDF document, close it entirely, and then reopen it. The Find dialog should now launch automatically upon opening.

Edit and Search PDFs Easily with WPS Office
While advanced JavaScript triggers require specific Acrobat versions, WPS Office provides a lightweight, highly compatible, and easy-to-use alternative for all your PDF reading, editing, and searching needs without complex scripting.
- 1. Open your PDF in WPS Office: Launch WPS Office and open your PDF document.
- 2. Access the Search Feature: Press the 'Ctrl + F' shortcut on your keyboard to instantly open the Find tool.
- 3. Search Document: Type your keyword in the search bar and press Enter to quickly navigate through the results.

Frequently Asked Questions
Can I make the Find dialog open automatically for every PDF I view?
No, there is no global application preference in Acrobat to apply this behavior to all PDFs automatically. You must embed the document-level JavaScript into each specific PDF file individually.
Why isn't the Find dialog appearing when I open the PDF in a web browser?
Most modern web browser PDF viewers disable or do not support document-level JavaScript for security reasons. The script typically only works when the document is opened in dedicated desktop PDF applications like Adobe Acrobat.
Is it possible to automatically search for a specific word upon opening?
While opening the Find dialog automatically is possible with the execMenuItem command, Acrobat's JavaScript API does not allow you to pre-fill the search box with a specific text string automatically due to strict application security restrictions.




