Skip to main content

Avoid repeating yourself: Create a Word macro

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.


You may also like these articles

Image for: An image of an African male founder working in conference room location in Ghana.

Microsoft 365 saves you time and effort with transcription and voice commands in Word

New enhancements in Office apps allow you to harness the power of your voice to spend less time and energy creating your best work, so can focus on what matters most.

Image for: Image of a father and daughter on a couch.

Introducing the new Microsoft 365 Personal and Family subscriptions

The subscription service for your life to make the most of your time, connect, and protect the ones you love.

Image for: Image of the new Surface Pro X with Earbuds.

Microsoft 365 makes work and play more intuitive and natural with innovations in voice, digital ink, and touch

Last week we announced several new capabilities that bring new inking capabilities to our Office apps, including Inking in Slide Show while in PowerPoint on the web and Ink Replay to bring your presentations to life. Today, I’m excited to share our progress with you on a set of innovations to help people be more productive when away from their desk utilizing voice, digital pen, and touch across Office 365 and our Surface devices.