Fun with Text Macros

1

Have you ever needed to type the same long company name, boilerplate blurb or multisyllabic mouthful over and over again in the same publication? Or every time you write a particular type of article or story in multiple publications?

If you’re not using InCopy’s Text Macros feature to share the workload, you’re missing out. By storing long names or phrases as entries in your Text Macros palette (Window > Text Macros), you can have InCopy automatically insert the entry’s full text in any story whenever you type the short code or keyboard shortcut you assigned to it.

Be kind to your typing muscles: Make with the macros.

Creating Your First Macro

Take a look at the stories you’re editing in InCopy right now, and with your Type tool, select a phrase or name that’s bothersome to type but will have to be entered again at some point. It can be just a few words long or even a few paragraphs long.

Now, with the text selected, add it as a text macro. Open the Text Macros palette from the Window menu if it’s not already open, then click the New Macro icon at the bottom of the palette (it looks like a dog-eared page). If you prefer menus, you could choose New Macro… from the palette menu instead, or if you’re a keyboard shortcut fan, just type Ctrl-Alt-F8 (Command-Option-F8 on a Mac) right after you select the text. Any of these three methods will add the selection as a macro and automatically open the New Macro dialog box.

New Macro Decisions

There’s just a couple things to do in the New Macro dialog box. First, enter a Macro code in the field at the top … a short sequence of letters and/or numbers that you’ll enter in the text flow whenever you want InCopy to insert the full text from the macro (what you had selected), replacing the code. Note that the code can’t include spaces, tabs, or punctuation (except for an underscore) because that’s what InCopy will be waiting for as its trigger to replace the code with the expanded text. Usually, an acronym makes sense.

For example, if you made “Republican National Committee” into a macro, you might use “RNC” as the macro code. Macro codes are case sensitive; so typing “rnc” in the story wouldn’t invoke the macro in this case. You’d have to enter RNC (all caps, just like you entered it as the code) to get InCopy to replace it with Republican National Committee.

Next, decide if you want the macro text to retain its original formatting (the formatting used in source text you selected) whenever InCopy enters it. If so, turn on the Retain Text Attributes checkbox. Otherwise, leave the checkbox disabled, and the macro text will come in with whatever formatting is currently in effect when you type the code.

Finally, you can add a keyboard shortcut to this macro if you want. Why would you need a keyboard shortcut if you’ve already entered a macro code? While it’s a convenient alternative, the main reason is that if you disable the “automatic swap text for code” feature (in the Text Macro palette menu) the keyboard shortcut will be the only way to enter the macro text from the keyboard.

Note that you can always insert macro text with the mouse: Highlight a macro entry in the palette and click the Insert Macro Text button (that weird x-arrow-z icon at the bottom of the palette), or press the command’s keyboard shortcut, Shift-Alt-F8 (Shift-Option-F8 for Macs), and the text is inserted at the cursor position.

Click the OK button to close the New Macro dialog box and give it a spin. Just start typing in a story and at some point, enter the code you assigned (be sure to precede the code with a space). As soon as you enter a space or punctuation mark after the code, InCopy replaces the code with the full, expanded macro text, and you can continue typing. Neat!

Anne-Marie “Her Geekness” Concepción is the co-founder (with David Blatner) and CEO of Creative Publishing Network, which produces InDesignSecrets, InDesign Magazine, and other resources for creative professionals. Through her cross-media design studio, Seneca Design & Training, Anne-Marie develops ebooks and trains and consults with companies who want to master the tools and workflows of digital publishing. She has authored over 20 courses on lynda.com on these topics and others. Keep up with Anne-Marie by subscribing to her ezine, HerGeekness Gazette, and contact her by email at [email protected] or on Twitter @amarie
  • Ryan Powers says:

    Thank you! This small tip is a lifesaver. I edit an InDesign document by committee, and am often the driver. I was getting so tired of people asking about the persistent floaty yellow box.

  • >
    Notice: We use cookies on our websites to give you a great online experience. If you keep browsing, we'll assume you're ok with this. For more information, see our privacy policy. By closing this banner, you agree to the use of cookies.I AGREENo