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
How to Modify or Configure these Scripts
Advanced Resources for Scripting and Publishing Automation
About This Repository
Contact Peter Kahrel
This article was last modified on July 31, 2026
This article was first published on February 12, 2025
Commenting is easier and faster when you're logged in!
Recommended for you
Align To Key Object
How to align objects to a "key object" -- the clunky pre-CS6 way and the elegant...
A Script for Styling Punctuation in InDesign
This free script formats punctuation to match the text immediately before and af...
Adobe Releases Major Bug Fix for InDesign 2021
The fourth release of InDesign 2021 addresses almost 30 issues related to crashe...
