The Novel Craft Blog

How to Install and Run Macros in Microsoft Word

by | Jul 13, 2020 | Word Tutorials | 2 comments

So, what exactly is a macro and why would you want one? A macro is a custom feature that you can add to Microsoft Word. Most macros are tools that can help you edit your work. Do you wish that Word could compile a list of all the proper names in your document so you could easily check their spelling? There is a macro for that. Do you have a list of phrases you overuse in your writing, and would you like Word to automatically highlight all of them? There is a macro for that too. If you can think of it, there is a good chance that there is a macro out there for the task.

As an editor, I have a bunch of macros up my sleeve to help me increase my editing efficacy and efficiency. If you’re an author, you can also use macros to help with your self-editing. In a later blog post, I’ll cover what specific macros can most help authors with self-editing. Today, I’ll show you how to install and run macros in Microsoft Word.

Where to Find Macros

Don’t worry – you won’t need to design your own code to install and use macros. Why? Because there are wonderful editors out there who have already designed macros and made them available for anyone to use. It’s pretty great.

Paul Beverley is one such amazing coder and editor. You can find links to a large list of macros and more instructional material here on his website. Most of my macros come from Paul’s free Macro Starter Pack.

How to Install Macros

The first thing you need to do to install your macro is to open up a file with your macro’s coding. If you’re using Paul Beverley’s macros, all the code will be in a single Word document. For the most basic macros, you won’t need to mess with the coding yourself. You’ll just need to copy and paste it into Word.

Also, do note that the below images are from the latest version of Microsoft Office 365. If you’re using another version of Word, these steps may look a bit different for you.

First, open up the file with the macro’s code. Then select the macro’s entire code. Make sure that your selection starts with the word “Sub” and end with the words “End Sub” so that you’re copying the entire macro. Then right click on the code and select “Copy.”

Image: Installing Macro Step 1

If you aren’t already in Word, open the Microsoft Word program. At the top menu, select View > Macros > View Macros.

A new window will open up. In the “Macro name” box, enter the macro’s name with no spaces. Then select the “Create” button.

Image: Installing Macro Step 3

Now a new panel will open up. It should look something like this:

Image: Installing Macro Step 4

Next, highlight the automatically generated text of code and click the backspace to delete it.

Image: Installing Macro Step 5

Right click on the empty line and select “Paste.” Your macro’s code should now appear on the page like this:

Image: Installing Macro Step 6

Select the save icon at the top left of the window. Then exit out of the widow by clicking the top right “X.”

Image: Installing Macro Step 6

Viola! You have successfully installed a macro into Microsoft Word. Now you need to learn how to actually use the macro.

How to Run Macros

To run the macro, open the same window you used to install it. At the top menu, select View > Macros > View Macros.

Image: Running Macro Step 1

In the window that pops up, select the name of the macro you wish to run. Then press the “Run” button.

Image: Running Macro Step 2

Your macro will now start doing its magic.

How to Back Up Macros

Once you have all your desired macros installed, it’s a good idea back up your macros. That way, you can be sure that you won’t lose all your hard work if something happens to your program or your computer.

To back up your macros, start with opening up that same macro window.

Image: Backing Up Macro Step 1

Then select the “Edit” button to open up your macro file.

Image: Backing Up Macro Step 2

Click anywhere in the code and select Ctrl + A on your keyboard (Cmd + A on Mac). All of your code will now be selected. Right click anywhere on the selected code and hit the “Copy” button.

Image - Backing Up Macro Step 3

Open a new document and paste the code into the document. I like to use the Notepad application to back up my code. That program adds zero formatting to its text, which is the neatest way to store code. Notepad comes automatically installed on Windows computers. Just type the word “Notepad” into the search bar and you should find it. But if you prefer to use a more familiar program, it will also work just fine to save your macro backup in a Word document. Here’s what my backup looks like in Notepad:

Image - Backing Up Macro Step 4

Then save your file somewhere on your computer. You have successfully created a backup of your code! If you somehow lose your macros in Word, all you have to do is copy and paste all your code back into the program.

A Quick Note About Backups

Since we’re talking about backups anyway, I should also remind you about keeping your computer files safe. If, for whatever reason, your hard drive suddenly dies, you will lose all the data on your computer unless you have your files backed up somewhere else. You can use cloud saving software to back up your files or you can regularly backup your computer using another hard drive you own.

Now, the specific steps to back up your computer is beyond the scope of this post. Just know that, should your computer’s hard drive fail, having made this macro backup won’t help you unless you also saved it somewhere else. Hard drives can last a while, but they don’t last forever. If you don’t back up your computer, you are playing with fire. You can read this article to learn more about how to back up your computer’s files and keep all your valuable documents and photos safe.

How to Assign Macros to Keyboard Shortcuts

This last step is entirely optional. But, if you find yourself using the same macro over and over again, wishing you didn’t have to click three buttons every time to run it, then this tutorial is for you. You can assign your macro to run with a quick keyboard shortcut.

Picking the Key

Before you begin, you should figure out which key you’d like to assign your command to. Every key will already be automatically connected to a command shortcut in Word. When you assign a new command to a key, you will be overriding the key’s original command. Make sure you aren’t overriding a command that you regularly use. Here’s a list of common commands in Word that you probably don’t want to override (if you’re using a Mac, use Cmd instead of Ctrl):

  • Ctrl + N: Create a new document.
  • Ctrl + O: Open an existing document.
  • Ctrl + S: Save the document.
  • Ctrl + P: Print the document.
  • Ctrl + F: Search the document.
  • Ctrl + C: Copy the selected item.
  • Ctrl + X: Cut the selected item.
  • Ctrl + V: Paste the selected item.
  • Ctrl + Z: Undo.
  • Ctrl + Y: Redo.

Once you decide the command key you do want to use, you can go ahead and assign the key.

Assigning the Key

Open Word. At the top left menu, select “File.”

Image: Assigning Shortcut Step 1

Then at the bottom left of the menu that pops up, select “Options.” A new window will open.

Image: Assigning Shortcut Step 2

In the window’s left side panel, select “Customize Ribbon.” At the bottom of the window, select the “Customize” button.

Image: Assigning Shortcut Step 3

In the top left “Categories” box, scroll to the bottom of the list and select “Macros.” A list of your macros will appear in the box to the right. In the list, select the macro you wish to assign to a command key. Then click on the box labeled “Press new shortcut key” (see #3). On your keyboard, hit the command buttons you wish to assign the macro to (for example, “Ctrl + Q” or “Cmd + Q”). Click the Assign button at the bottom left. Your command will move to the “Current keys:” box.

Image: Assigning Shortcut Step 4

You’re done! Select the “Close” then “Ok” buttons to close the two windows. Now, all you have to do is hit your keyboard shortcut and the macro will immediately start running.

About the Author

About the Author

I’m Amelia Winters, a professional fiction editor, language nerd, and story aficionado. By night, I chase stories and explore distant worlds through books, role-playing games, and sewing my own historical garments. By day, I journey with authors to help them hone their story craft, elevate their voice, and polish their prose.

To learn more about my editing services, click here.

2 Comments

  1. Karen

    Fingers crossed but think I’ve actually been able to get this to work!! Its taken hours. Thank you

    Reply
    • Amelia Wiens

      I hope it works! I’m glad I could help ?.

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Pin It on Pinterest

Share This