Avoid repeating yourself: Create a Word macro
used with permission from Microsoft
by Emily Warn
Repeatedly entering the same information in document after document, over and over…there has to be a quicker way, right? Word macros can save you time (and potentially, some sanity) by automating repetitive tasks.
Let’s say you’re a real estate agent. Every time you sell a house you have to add a client’s name and address to multiple documents. Creating a macro automates adding all of a client’s contact information wherever you need to.
Setting up the macro
Creating a macro is straightforward and doesn’t require any coding knowledge. You simply tell Word when to start and stop recording a series of steps; for example, from when you start typing a client’s name to when you finish. Then Word will perform all of those steps automatically when you click a button or enter a keyboard shortcut that you assigned to that macro.
Here’s a step-by-step:
1. Go to the View tab, click the Macros dropdown and select Record Macro.
In the Record Macro dialog box, you’re going to to name and describe your macro, and then choose whether you want to run it via a button or keyboard shortcut.
2. In the Macro name field dialog box, give your Macro a name that has no spaces in it, e.g.,AdamSmith instead of Adam Smith.
3. The Description field is for you. Over time you might create dozens of macros and might have trouble remembering which is which. Enter a description that will help you out.
4. In Store macro in field, define whether the macro will run in your current document or in all documents. Choose the option–All Documents–to run it in all documents.
5. Decide whether you’ll use a shortcut or button to run the macro by clicking the Button or Keyboard icons. For this exercise, click Button.
Adding the macro button to the Quick Access Toolbar
After you click Button, Word lets you add your button to a place where you can easily find it–the Quick Access Toolbar.
1. In the Word Options/Quick Access Toolbar box, click the name of your macro, and then click Add to include it on the list of other commands on the Quick Access Toolbar.
To make sure you can identify the button on the toolbar, you need to choose a type of button.
2. Click Modify, and then choose a button from the dozens available.
Recording your macro
As soon as you choose your button and then click OK, the macro starts running, recording your keyboard strokes until you stop the recording. For example, I chose the button of a guy wearing a tie, clicked OK, and the macro started recording the address I typed of a fictitious client named Adam Smith who lived in Lincoln, Nebraska. When I finished typing, I clicked Stop Recording in the Macro dropdown.
Here’s how you can do that yourself:
1. In the Modify Button dialog box, choose a button and then click OK.
2. Click OK again in the Word Options box, and the macro starts running.
3. Perform the actions you want to include in your macro.
4. Once you’ve completed the actions, go to the View tab, select the Macro tab and click Stop Recording.
5. You’ll now see that a button for your macro now appears on the Quick Access Toolbar. Just click it, and the same actions that you recorded will happen again wherever you put your cursor in a document. You’ll see this button on the Quick Access Toolbar in all of your Word documents–unless you chose that it only appear in your current one.