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...
Oops, you’re not logged in!
Login or sign up for a free account.
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 September 23, 2026
This article was first published on December 28, 2025
Commenting is easier and faster when you're logged in!
Recommended for you
Dynamic Sidenotes
Based on the method for dynamic endnotes first outlined by Peter Gold and formal...
A Script to Flag Certain Words in InDesign
Free script to flag risk words in InDesign, so you can spot them easily and remo...
Opinion: InDesign’s Auto-generate Alt Text Feature Needs to Change
How it might damage your accessibility workflow and how it can be fixed
