Find and Change in Book Files
To find something in a book file's documents, you have to open all documents, then run a Find query. The script looks through all documents and opens only those that...
This script is part of the Book Panel collection. See the full collection here.ย
You’re working on a text that’s contained in several chapters, which in turn are included in a book file. Now if you want to look for something you’ll have to open all the book files, select ‘All documents’ in the Search dropdown, then do the search. The same goes for making replacements: you must open all documents then run a query.
This is perfectly doable but if your book file contains many files, then opening and closing those files becomes a distraction. The script described on this page makes things easier and much quicker.
Use
Run the script from InDesign’s scripts panel. It opens a small panel:

The idea is that you enter your search string or pattern in InDesign’s Find/Change window, along with any formats and/or replacement text and/or pattern. Now, unfortunately, a script can’t see whether the Text or the GREP tab is active, and it’s impossible to check whether anything was set in the Find Format and/or Change Format panes, so a script can’t derive from the Find/Change window what you want to do. That’s why the script panel is needed.
So enter values in the Find/Change window, selectย Grepย orย Textย andย Find only orย Find and change, then clickย Goย to apply the query.
The script is fast because it opens documents without showing them, which saves a lot of time. When a document contains what you were looking for it’s made visible, otherwise it’s closed. So when the script finishes only those files are open that contain what you were looking for. Now you can use Find Next in the Find/Change window โ targeting All Documents โ to review the found (or replaced) items in all the documents.
Peter Kahrel Script Repository
Hosted as a community service, and with deep appreciation, by CreativePro.com
Scripts by Topic | Script Index
Basic Script Installation and Use
How to Modify or Configure These Scripts
Resources for Scripting and Publishing Automation
About This Repository
Contact Peter Kahrel
Note to users: You run scripts at your own risk: CreativePro and the author accept no liability for anything that may be caused by any of these scripts. Always take the necessary precautions. We encourage you to save backups and test scripts on copies of your documents.
This article was last modified on August 15, 2026
This article was first published on February 12, 2025
Commenting is easier and faster when you're logged in!
Recommended for you
Five Ways InDesign Libraries Are Better Than CC Libraries
Creative Cloud Libraries are great and make it easy to have elements, themes, an...
How to Start Using InDesign Scripts
Simple steps to get started running scripts to automate Adobe InDesign
How to Make an Object Style That Resizes Objects from the Center (or Any Other Reference Point) in InDesign
Learn the sneaky trick for choosing how an object resizes when you apply an obje...
