How to Create a Macro for Text Formatting

Macros make quick work of complex formatting requirements

What to Know

  • Select the text to format, then turn on the Macro Recorder (enter Macro in search bar > Record Macro).
  • Next, apply the desired formatting to your text > turn off the Macro Recorder.
  • To use the macro, select text to apply the formatting macro to, then select the Macro tool in the MS ribbon > Run the macro.

This article explains how to create and run a macro in Microsoft Word to format text in a very specific, often complex, way.

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.

Was this page helpful?