A Script to Reset InDesign’s Find/Change
A free script for clearing the fields and options in InDesign's Find/Change dialog box.

InDesign’s Find/Change feature is very powerful but the user interface lacks polish in some places. For example, the window doesn’t have buttons to clear the Find What and Change To fields in the Text and GREP tabs.

If you use Find/Change a lot you know it’s cumbersome to clear the fields manually. And it can be a real problem if you didn’t notice there’s a space in the Change To field. You may think that you’re applying a paragraph style or a character style to all text that matches your search criteria, but instead you delete it all (replacing it with the space).
So, to address this problem, here’s a simple two-line script that resets the GREP tab:
app.findGrepPreferences = app.changeGrepPreferences = app.findChangeGrepOptions = null;
app.findChangeGrepOptions.
It clears the Find What and Change To fields, clears Find Format and Change Format, resets the option icon buttons (ignore parent pages and locked layers, enable footnotes), and sets the search direction to Forward.
If you want a version of the script that works for the Text tab as well, simply duplicate the script and edit it to replace all instances of Grep with Text.
You can download both versions of the script here.
Need help installing a script? Read this post.
Commenting is easier and faster when you're logged in!
Leave a Reply
Recommended for you

Illustrator Downloadable: Tropical Shadow Overlay Kit
Downloadables are an exclusive benefit for CreativePro members! (Not a member ye...

Illustrator Downloadable: Summer Citrus Pattern Set
Downloadables are an exclusive benefit for CreativePro members! (Not a member ye...

InDesign Downloadable: Tables SuperGuide
Downloadables are an exclusive benefit for CreativePro members! (Not a member ye...
Great! I knew about setting the preferences to null, but I’ve never tried setting the findChangeOptions to null. Didn’t realize that would work!
Another option that doesn’t require a script: Set up a blank find/change, and store it as a find/change preset. Bonus points: Call it “AAANothing” so it’s always at the top of the list and easy to find…
I love that idea! Thanks, Ariel.
You can combine both to reset Text and GREP windows with a single script.
I have one that reset Text, GREP and Object Windows. Assign a shortcut to it and it’s easy to clean the find/Change windows.
Adding the Text reset steps before the last “}” in Jongware’s excellent Preptext script fixes my only gripe with that script! Now the find/change is clear after running Preptext.