Office XP Tips: A Better Way to Launch MacrosHow to customize your Word toolbars and add macro buttons.
Word macros are great for automating repetitive tasks. You can assign a macro to a key combination, then run the macro by pressing those keys. But Word also lets you use a toolbar button to run a macro. When you create a macro and assign it to a toolbar button, you can run that macro at any time by just clicking the button. For instance, you might record your name, address, and phone number in a macro for easy insertion into any document, and assign the macro to a button. You could then just click the button when you need that text. Besides just being kind of cool, a button can be handy if your short-term memory is waning and you don't want to memorize keyboard commands for a lot of macros, particularly those you use infrequently.
But the best part is the macro button doesn't have to be an ugly default text button. Word lets you liven up the toolbar by using one of several built-in toolbar images or--if you're a virtual Van Gogh--drawing one of your own. This week I'll show you how to assign a macro to a toolbar button, then how to spruce up the button with its own pretty little picture. If you're unfamiliar with Office XP macros, please see "Macros 101." Also see "More Power From Macros."
Assigning a Macro to a Toolbar Button
With minimal pain and suffering, you can create a toolbar button for a new or existing macro. First I'll describe how to create the icon at the same time you create the macro, then I'll show you how to create a toolbar button for an existing macro. (For complete instructions on recording macros in Office XP, see "Macros 101" at the link above.)
Here's how to assign a macro to toolbar button when you first create the macro:
- Record the macro as usual, choosing Tools, Macro, Record New Macro.
- Type your macro's name in the Macro name text box, then click the Toolbars button.
- When the Customize dialog box appears, find your new macro in the Commands list and click it. (Your macro will have a goofy name, like "Normal.NewMacros.JackSprat" but don't worry about that now. We'll fix it later.)
- Drag the macro out of that dialog box and onto one of Word's toolbars.
- Drop the macro onto any open toolbar. If you choose an off-limits location, Word displays an X near the mouse pointer. Otherwise, you'll see a plus sign and an I-beam, indicating where the button will go.
- Let go of the mouse button to create the toolbar button, then click Close to begin recording your macro.
If you've got an existing macro you'd like to assign to a toolbar button, here's what to do:
- Right-click any toolbar.
- Choose Customize to open the Customize dialog box, then click the Commands tab.
- In the Categories list, click Macros.
- Find your macro in the Commands list, then click and drag it to a toolbar as described above.
Dressing Up the Button
Okay, if you've been following along at home, you've now got a toolbar button for your macro--but it's not much to look at. Not only is it a wide, ungainly button, but it's also just plain text. And the text isn't even that descriptive. Let's fix that. The procedure is simple, but it's not very intuitive.
First, right-click a toolbar and choose Customize from the pop-up menu. Now, ignore the dialog box you just opened (but keep it on screen) and right-click the macro button you want to change. Another pop-up menu appears with several handy commands. First, let's ditch that goofy name.
Click Name on the pop-up menu and type a new, brief, logical name right in the menu. (Weird, eh?) For instance, if your macro prints and closes the current document, you might type Stanley. No, seriously, you might call it "Print and Close." With the menu still on screen, click Change Button Image. When you do, your new name appears on your button and another menu pops up, this one with little pictures to use on your macro button. Choose an image from the menu and your stylish new button is complete. Your button now has a cute picture and a descriptive name--and when you click it, it runs your macro.
Fine-Tuning the Button
If you want to further tweak your button, you'll want to play with a few handy commands. With the Customize dialog box still open, right-click your new button to display its command menu. To display the text without the image, select Text Only (Always) on the command menu. To show the image without the text, choose Text Only (in Menus). To display both the text and the image, select the surprisingly logically named Image and Text command. To delete the button altogether, choose Delete.
Just Like Lite-Brite, Only Nerdier
If you're feeling really creative, try drawing your own picture, a pixel at a time. Open the Customize dialog box again (right-click a toolbar and click Customize), right-click the macro button you want to change, and choose Edit Button Image to open the Button Editor dialog box. Click the Clear button to start with a fresh canvas, click to choose a color, then create your own masterpiece. I'm no artist, but after a few minutes of clicking and a couple of shots of bourbon, I was able to create a pretty good approximation of a chicken.
By the way, you can use these techniques to modify any toolbar button in Office XP, but do so sparingly. If you get carried away, you might wreak havoc with your toolbars. Unless you're an artist or find Word's icons exceedingly unclear, you're probably better off going with the default images. If you trash your button, just open the Customize dialog box, right-click your wrecked button, and choose Reset Button Image to revert to Word's default image for that button.