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:

Find and find-change in book files

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


Bookmark
Please login to bookmark Close

This article was last modified on July 31, 2026

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading comments...