I was recently needing a way to clear all overrides in a 100+ page book. The book was divided into many separate stories, so it was not possible to simply “select all” and click on the “Clear overrides” button.
Instead of going through each story in turn, selecting all the text there, clearing overrides, and repeating that for each story in the document, I wrote a quick script.
(In fact, if it is necessary to clear all local overrides in footnotes it can be even more time-consuming, as there is no way to select all footnotes in one go. Rather, it would be necessary to clear the overrides one footnote at a time – although if the footnotes have a paragraph style applied then there is a shortcut for doing this.)
The script below will clear all paragraph-level and character-level overrides in the active InDesign document.
To use, simply copy the script into your favorite text editor, save with a .jsx extension, and place into your InDesign Scripts folder.
// Clear All Overrides // Written by TAW. (c) 2014 by Bookraft Solutions, Israel (Id-Extras.com) // Please do not delete this copyright notice. // var myOverrideType = OverrideType.ALL; // var myOverrideType = OverrideType.CHARACTER_ONLY; // var myOverrideType = OverrideType.PARAGRAPH_ONLY; var allStories = app.activeDocument.stories.everyItem(); // Remove overrides from all stories try{ allStories.clearOverrides(myOverrideType); } catch (e){alert ("No stories!")} // Remove overrides from all footnotes try{ allStories.footnotes.everyItem().texts.everyItem().clearOverrides(myOverrideType); } catch (e){alert ("No footnotes!")} // Remove overrides from all table try{ allStories.tables.everyItem().cells.everyItem().paragraphs.everyItem().clearOverrides(myOverrideType); } catch (e){alert ("No tables!")} alert("Overrides cleared!");
As is, the script will clear all overrides throughout the document from all text, including all text in tables and footnotes. It will clear paragraph-level overrides as well as character-level overrides.
However, it is easy enough to modify the script to suit your needs.
First of all, if you need to clear only paragraph-level overrides, or only character-level overrides, simply comment out the relevant line: Of lines 7, 8, and 9, exactly two should be commented out. (I may add a UI if I get the chance.)
Then, if you do not need to delete overrides from tables, footnotes, or regular text, comment out the appropriate lines there too. It should be self-evident how to do this, but if you have a question, leave a comment below.
Ariel
May 1, 2025 9:52 pmHi Rob,
Not really so easy. The script uses a basic InDesign scripting command to clear all overrides. It has a parameter to choose whether to clear paragraph-level overrides, character-level ones, or both. But it doesn’t have more granularity than that, so you can’t tell it, say, to leave text colour alone.
The best way to do that would be create and apply a character style to all blue text in the document (a simple find/change could do this). WIth a character style applied, you could then run the clear overrides script on this page, and now, since the blue text has a char style applied to it, it is no longer considered “overriden,” and so will be preserved.
My Auto Character Style script (https://www.id-extras.com/products/auto-character-styles/) makes it easy to create and apply character styles to all sorts of different things, including text fill and stroke colour, and was written precisely to make sure that formatting you want to maintain does not accidently go missing in the course of typesetting and designing text.