Text Macros


Autocorrect is a great way to let InCopy fix your spelling and typos, but text macros can take it to the next level. If you've never experienced text macros in other word-processing programs, you've been missing out. In short, a text macro can take a complex series of keystrokes combined with formatting and allow you to boil it down to just a few keystrokes. If you find yourself repeatedly typing involved chunks of text that need to be formatted or assigned to styles, a text macro can save you time and energy. For example, typing President George W. Bush repeatedly is both difficult and time-consuming. What if you could reduce it to just two or three keystrokes?

Creating Text Macros

Creating text macros is easy. We recommend that you type the actual macro text you want to use onto the page (in our case, President George W. Bush) and apply any formatting you want, either with paragraph or character styles, or by manually formatting the text, and then select your text. Open the Text Macros palette (Window > Text Macros) (Figure 4.20). Either click the New Macro button at the bottom of the palette or from the Text Macros palette menu choose New Macro and behold the New Macro dialog (Figure 4.21).

Figure 4.20. All your text macros are listed in the Text Macros palette. To the left, the macro code; in the center, the Macro Key Shortcut, if you used one; on the right, an "a" means that you checked the Retain Text Attributes box.


Figure 4.21. Macro text can retain formatting, which makes text macros very powerful tools.


Tip

If you use the New Macro option without typing, formatting, and selecting the text in your document first, the text macro field of the New Macro dialog will not remember text attributes, even if you check the box in the dialog.


Atop the box, you'll create a macro code. A macro code is the name of the text macro you create. Type a macro code, and InCopy will replace the code with actual text. In our example, InCopy will replace the letters GWB with George W. Bush. First, type GWB in the Macro Code field and then type George W. Bush in the Macro Text field.

Tip

One of the good things about text macros is that the macro codes are case sensitive. GWB can be the macro code for George W. Bush, but you might have another macro code gwb, which will generate George Washington Bridge. Nifty, eh?


Check the Remember Text Attributes option if you want specific formatting to be applied to the text every time you type the macro code. Formatting might mean that you've applied paragraph or character styles or you've manually formatted the macro text, such as changing a type style to bold. If you do opt to "remember text attributes," the Text Macros palette will display an a to the right of the listing for that text macro (see Figure 4.20).

Last but not least, you can assign a macro key shortcut at the bottom of the dialog. This is ideal for invoking a text macro with a specific keyboard shortcut rather than a set of keystrokes you might want to reserve for actual use. Continuing with the PM example, earlier in this section, if you type in a macro code of PM, which will type the copy Prime Minister, you can assign a macro key shortcut of Command-Shift-F12, so that if you type in PM, it will remain PM, but if you press Command-Shift-F12, InCopy will type in Prime Minister without causing you grief when typing 12:38pm. Click OK and note that the macro code is now listed in your Text Macros palette.

Another way to prevent the keystroke PM from automatically expanding to Prime Minister Tony Blair is to head over to the palette menu of the Text Macros palette and uncheck Automatically Swap Macro Text. The default setting is on (Figure 4.22), but if you turn it off, only the macro key shortcut will generate your text macro.

Figure 4.22. Automatically Swap Macro Text is checked by default.


Tip

Text macros are listed in the Text Macros palette in alphabetical order, but those with a capitalized first letter in the macro code come first. ABC would come first, GWB would come second, and abc would appear third. There is no way to change this.


Using Text Macros

Using a text macro is easy. If you assigned your text macro a macro code and left the Automatically Swap Macro Text option checked at the bottom of the Text Macros palette menu (Figure 4.22) then type the macro code into your document and the macro text will immediately replace your macro code. You could also type in the macro key shortcut, and that will invoke your macro text.

At the bottom of the Text Macros palette (see Figure 4.20) are buttons that do the same things as some of the options in the Text Macros palette menu. From left to right:

  • Insert Macro Text will do exactly that. Click on one of the text macros in the Text Macros palette and click this button. InCopy will insert your macro text at the insertion point in the document.

  • Edit Macro allows you to modify the attributes, such as text, formatting, and macro keys for a selected text macro.

  • New Macro creates a new macro, as described earlier.

  • Delete Macro deletes the text macro currently selected in the Text Macro palette. (If you do this, InCopy will open a dialog warning you that this action cannot be undone. Just say OK to make the deletion.)




The AdobeR InCopyR CS2 Book
The Adobe InCopy CS2 Book
ISBN: 0321337050
EAN: 2147483647
Year: 2006
Pages: 122

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net