is now part of CreativePro.com!

A Script to Edit Styles with Find/Change

6

Bookraft Solutions has created a really useful script that will be of interest to anyone who works with documents containing styles. Search in Styles ($49 USD) will let you perform a Find/Change operations to edit your document’s paragraph and character styles. Why is this useful? Here are a couple examples:

When you first run the script, all of your paragraph styles are displayed in a long list. Clicking on the Find/Change button displays InDesign’s Find/Change dialog box, shown here on the left.

Now, imagine that I want to find all of the Paragraph Styles that specify 9.5 pt type. First, I specify that in the Find Format field in the Find/Change dialog box on the left. Then I specify 10 pt type in the Change Format field, so the dialog boxes look like this:

Next, I click on the Update List button to load the settings from the Find/Change dialog into the Search in Styles dialog and display only the Paragraph Styles that specify 9.5 pt type:

Then, I click the Change All button to change the styles in the list to 10 pt. In the screen shot below, the button has already been clicked, so the “QA question text” and “QA answer text” styles have disappeared from the list, because they no longer specify 9.5 pt…they’ve been changed to 10 pt:

Here’s another thing you can do with the script. Imagine you want to find all the Paragraph Styles with “Title” or “title” in the name, and change the font in those styles to Adelle Sans Bold. In the screenshot below, I’ve entered Title|title in the Find what field. The “|” character means “or” in GREP code. The script supports simple GREP expressions in the find and change fields.

In the Change Format field, I’ve specified Adelle Sans Bold. After clicking on the Update List button, I see all the Paragraph Styles with “title” in the name displayed in the list. Clicking on the Change All button would change all of these styles to specify Adelle Sans Bold.

This script could save hours of work and frustration. It would be particularly useful for cleaning up documents that have been authored and edited over a long period of time by several people. These documents tend to be full of old, redundant, or mislabeled styles. Cleaning these up would be much easier with the help of this script.

Keith Gilbert is a design consultant, developer, educator, speaker, and author. His work has taken him throughout North America, Africa, Europe, and Asia. During his 35+ year career his clients have included Adobe, Apple, Target, Oracle, and the United Nations. He is the author of several popular titles for LinkedIn Learning, Adobe Press, and CreativePro. Find him at gilbertconsulting.com and on Twitter @gilbertconsult
  • Anne-Marie Concepcion says:

    marvelous!

  • Bart Eenkhoorn says:

    I use the Multi Find/Change plugin that also allows for changes in styles:
    From the Manual:
    • Character Styles – Search in Character Styles (valid only for Text and GREP queries).
    • Paragraph Styles – Search in Paragraph Styles (valid only for Text and GREP queries).

    How would you compare the two Keith?

    • Keith Gilbert says:

      Bart, I LOVE Multi Find/Change! I had forgotten that MFC allows you to search in paragraph and character styles. Thanks for pointing that out.

      The 2 products complement each other. MFC’s strength is in being able to string together multiple queries, and perform them all with one command. But it requires more setup than Search in Styles to do just a simple single find/change in styles.

      Search in Styles gives you really nice visual feedback about which styles match your find criteria, so that you know what the extent of your change is going to be. This is really important when trying to clean up “mystery styles” in a complex document that you didn’t create.

      Search in Styles, on the other hand, doesn’t allow you to string together multiple queries into a single operation like MFC does.

  • The script is quite useful for those wrestling with an existing style set, but keep in mind that you can used the ‘based on’ of paragraph styles to establish a master style that defines only the font and font size of, for instance, all body text. Change that master, and all the ‘slave’ styles change, whatever their other differences.

    The webpage linked also has another useful style, one that applies a master page based on the paragraph and object styles on that page.

    https://www.id-extras.com/products/mastermatic

    What I’d like most is an add-on that does a find with multiple replaces that are chosen when the find result is on screen. Often, I do searches in which I need to replace one item with two or more different items, depending on the context. That means either stopping to hand edit one of the changes or making two search passes.

    A better UI for search/replacment would also be handy in the same add-on. Most S/Rs mean jumping between Find Next (i.e. do no replacement) and Change/Find (replace and move on). But in Adobe’s UI, that means hopping over the dread Change All button ot do that. When you’re making hundreds of changes by hand, it is easy to click on the wrong button. Change All needs to be well isolated from the others.

    Search and replace in ID is actually quite marvelous, particularly in comparison to all the other apps I use. It just needs a few tweaks to make it near-perfect. S/R tasks tend to be so tedious, any deficency ends up one users must cope with hundreds of times. It can get mind-numbing. That button-hopping is one illustration that’d be easily fixed.

  • Matt Mayerchak says:

    Hi – I was disappointed to see that I can’t search for styles containing hyphenation or justification settings. This would be a very valuable thing to be able to do.

    Does anybody know of any other tool that allows you to search for H&J settings within paragraph styles?

  • >