From the course: InDesign Secrets

174 How to sort text in InDesign - InDesign Tutorial

From the course: InDesign Secrets

174 How to sort text in InDesign

- I need to alphabetize this list, and did you know that InDesign can do that for you? But you can look high and low in InDesign's menus and you'll never find the feature. Instead, you have to run a script that comes with InDesign. It's free, it ships with InDesign, but most InDesign users have no idea it's there. You can find it by heading up to the Window menu, choosing the Utilities submenu, and then choosing Scripts. Inside the Scripts panel, you want to open the Application folder, and then the Samples folder, and then, the JavaScript folder. And there's all kinds of cool scripts in here. I'm going to scroll down to near the bottom, and here I see the sort paragraph script. That's the script that's going to let me alphabetize this text. But before I run it, I have to select the text that I want to alphabetize. So, I'll double-click over here to switch to the Type tool, and then select all the text I want to alphabetize. Now, I'm going to run the script by double-clicking on it in the Scripts panel. I have two choices inside this Sort Method pop-up menu here, I can choose Ignore Formatting or Retain Formatting. Formatting has to do with the text formatting that I've placed on top of the text. For example, if any of this text had italic or bold text, I would need to choose Retain Formatting. But because there's no local formatting here, I can just leave it set to Ignore. Then, when I click OK, in an instant, InDesign goes through and alphabetizes the whole list. Now there are two weird things about this script that I want to let you know about. One is, if you want to undo this, you sometimes have to undo two or three times to get it back to the way it was. For example, I'll hit Cmd+z or Ctrl+z on Windows once and nothing happens. Then I'll press again, and then it goes back to the way it was. The second thing has to do with that Retain Formatting feature that I pointed out. Let's go ahead and select some text and I'll make it italic, for example. Now I want to run this script again, but I want to be very careful about what I select. When you have formatting and you know that you're going to be using that Retain Formatting feature, you want to make sure you only select the text you want formatted, not any additional empty lines. See how down at the bottom, there's an empty paragraph? I don't want that. I'm going to move my cursor up to just the text inside that paragraph. For some reason, if there's formatting and empty paragraphs, the script kind of freaks out and you get a warning. But now, with just that text selected, I'll run the script one more time by double-clicking on it, I'll choose Retain Formatting slower, and then click OK. Sort paragraphs is a great script, and it can save you so much time. There's a bunch of other scripts in here, too you should try. Just start double-clicking on these and see what they do.

Contents