Update 6/7/13: There is an error in this tutorial regarding the highlight feature. There are notes in the comments on the correct way to do it. I will be updating the post soon. Thanks goes to Serena Yung for pointing out that it wasn't working. :)
Today’s topic will be easier if you’re familiar with Find and Replace, since I will be using those as part of my example.
Macros might seem a little scary, but once you understand what they are and how they work, I think you’ll find they’re actually quite easy to use and very useful, especially during revisions. Basically, it’s a recorded set of steps that can be accessed by a shortcut key, a button on the toolbar, or by selecting from a list.
With this feature, I recommend reading through all the instructions before trying any of it. It will probably be less confusing that way.
The macro options are under the Developer tab.* By default, this tab is turned off in MS Word 2007, so first, you’ll need to turn it on. To do this, click the Office button in the top left corner (Figure 1).
Figure 1
Select Word Options at the bottom of the menu (Figure 2).
Figure 2
In this menu (Figure 3), select Popular in the left column and check the box next to Show Developer tab in the Ribbon. Then click OK.
Figure 3
You should now have the Developer tab in your Ribbon (Figure 4).
Figure 4
First, click the Record Macro button (Figure 5).
Figure 5
This menu will pop up (Figure 6). Enter a name in the Macro name: box. You can also add a description in the bottom box if you want.
Under Store macro in: you can choose to have it apply to all documents or just the one you are currently working with.
Figure 6
Under Assign macro to (Figure 6), you can choose to access the macro through a Button (Option 1) on your Quick Access toolbar or through a Keyboard shortcut (Option 2). If you don’t select one of these options and just click OK from this menu, it will immediately begin recording your macro. In this case, after you have recorded your macro, you will have to go to the Macros button (Figure 7) under the Developer tab and select it from a list (Figure 8) and click Run every time you want to use it (Option 3).
Figure 7
Figure 8
Note: This window (Figure 8) is also where you go to Edit your macros, but editing macros requires editing code, so unless you’re familiar with code, I wouldn’t attempt this. If there is problem with one of your macros, the easiest thing will probably be to Delete the macro and record it again.
Option 1: In the Record Macro window (Figure 6), choose Button under Assign macro to, it will go to this screen (Figure 9). Select the macro from the list in the left column, click Add>> and it will add it to the right column, which lists all the buttons in your Quick Access menu (this shows to the right of your Office button (Figure 1)). You can change the icon for the macro by selecting the macro and clicking Modify. Then click OK to begin recording your macro.
Figure 9
Option 2: In the Record Macro window (Figure 6), choose Keyboard under Assign macro to (Figure 6), and it will go to this screen (Figure 10). In the Press new shortcut key: box, press the keys you want to assign to the macro (pressing the Alt key at the same time as another key will enter “Alt+whatever key you pushed” and the same works for the Ctrl key). It will show you if that shortcut is already assigned to something else next to Currently assigned to:. Once you’ve chosen your shortcut, click Assign to begin recording your macro.
Figure 10
Now that you’ve clicked OK or Assign, you are in record mode, and it will continue to record until you click Stop Recording.
You can record anything with a macro. For today’s tip, we’re going to create a button to highlight overused words. So, using the Find feature, follow the steps to highlight any overused word(s) (Figure 11). See this post for more detailed instructions.
Figure 11
- Go to Find under the Home tab.
- Type in the word you want highlighted, check Find whole words only (Figure 11) and select Highlight All.
- Repeat steps 1 and 2 for any other words you overuse frequently.
- Click Cancel or the X to close the window.
At this point, all instances of overused words should be highlighted in your document. Now go back to the Developer tab and click Stop Recording (Figure 12). Note: It will continue to record until you click Stop Recording so it’s very important not to miss this step.
Figure 12
Quick review of the steps:
- Click Record Macro under the Developer tab.
- Select your preferred method to access the macro (button, keyboard shortcut, or list) and complete the steps to set up that method.
- Complete the steps for the function you would like to record—highlight words, format changes, font changes, etc. Anything that Word can do, you can record in a macro.
- Click Stop Recording.
Now, if you chose the Button (Option 1) as you were setting it up, all you have to do to highlight all your frequently overused words in future documents is click on the button in your Quick Access menu (Figure 13). It might look different, depending on which icon you chose.
Figure 13
If you chose Keyboard (Option 2) as you were setting it up, then when you want to run the macro, just type in the keystrokes you selected. In this case, I chose Alt+Z.
Now you’re ready to set up macros for anything you do frequently in Word.
Anyone using this already? Anything you love to use it for?
More Word tips posts
here.
*Word 2007