How to Create a Macro for Text Formatting

Macros make quick work of complex formatting requirements

If you frequently need to format text in a very specific way that incorporates several different formatting options, consider creating a macro

What Is a Macro?

A macro is a shortcut for performing more than one task. If you press Ctrl+E or select the Center Text button from the ribbon in Microsoft Word, your text automatically centers. While this one-click solution may not seem like a macro, it is. 

A Macro applies your custom formatting to any selected text with the click of a button rather than having to change the font, text size, positioning, or spacing manually.

Man typing on laptop in coffee shop


Westend61 / Getty Images

Create the Formatting Macro

While creating a macro may seem like a complicated task, it is actually quite simple. Just follow these four steps.

  1. Select a section of text for formatting.

  2. Turn on the Macro Recorder.

    Type macro in the Search box at the top of Word to find it fast.

  3. Apply the desired formatting to your text.

  4. Turn off the Macro Recorder.

Using the Macro

To use the macro in the future, simply select the text to which you want to apply the formatting using your macro. Select the Macro tool from the ribbon and then select your text formatting macro. Text entered after you run the macro will retain the formatting of the rest of the document.