A macro is a short piece of code that runs in the background of the Word application. You can create macros to open documents, format documents, run formulas or perform anything you can type on a keyboard. If you are performing the same actions frequently, you can just create one macro for these operations and your Word will perform those actions automatically. This doesn't require any programming knowledge or technicality. You can create a macro by using the macro recorder to record a sequence of actions. When you first create a macro by recording it, you can assign the macro to a specific key combination. It actually records each and every click and keystroke you press while performing the task and then you can play them back to perform same action over your documents.
Here are a few steps to create a macro in Microsoft Office Word:
- Navigate to the “View” and then under “Macros” choose “Record Macros” in Word 2007 and above. (In Word 2003, click on Tools -> Macros -> Record Macros)
- Assign a name for your macro in the “Macro name” box
- Then just click on the template or document in the “Store macro” box in which you want to store the macro
- Type a description for the newly created macro in the “Description” box
- Press “OK” to start the macro recording. Now the macro will record all your keystrokes and mouse clicks
- Now, just perform the actions that you wanted to replace with the macro
- Once, you complete with the typing of your documents and the action that you needed to record then stop macro recording for this use: Click “Macros”- > “Stop Recording”
- Now your macro will be saved. To run the macro go to View -> Macros
- Under Macro Name, click the macro you want to run
- Click the “Run” button
Add keyboard shortcuts:
Your macro should run successfully and perform all the tasks that you recorded. To execute the macro every time you need to Run it, hence to reduce the time consumption you can assign a keyboard shortcut to a macro as you create it.
To assign a keyboard shortcut to an existing macro, follow these steps:
- Choose File - > Options
- Click on “Customize Ribbon”
- Click the “Customize” button that is present next to “Keyboard Shortcuts”, near the bottom of the dialog box. Now the “Customize Keyboard” dialog box appears
- In the Categories list, scroll down to the bottom of the list and click “Macros”
- A list of the macros in the current document or template appears in the Macros list
- If you cannot see the macros in the list then just check out the document name in the option “Save Changes in” that is situated below the macros list option, specify the correct document name on which you had created the macros
- Now, select the macro for which you need to assign the shortcut
- Then, just type the Shortcut Key of your choice (easily remember able) which in the “Keyboard Shortcut” option present in the same window
- Then, just hit “Close”
Just try pressing applying the shortcut key in the same document to which you created the macro. Your Macro should run perfectly and perform all the actions that were recorded. Isn't it very easy? However, be careful while recording your macros and especially when assigning the keyboard shortcuts. In case you select the wrong option or incorrect keys by mistake, there are chances of corrupting you Word document. A small mistake would cost your entire Word document. But, no need worry much, if you encounter such instances make use of the Remo Repair Word tool that can easily repair corrupt Word template in few easy mouse clicks. Thus this is how you can create the macros and even assign the shortcut key for it.
Tony Landry is a Web Content Editor at Remo Software. He loves to write, edit, and manage content for users trying to troubleshoot and fix problems on Windows, Outlook, storage drives and Cloud storage networks.
He has published more than 200 articles in Remo Software blog. He actively engages in research and problem-solving techniques to consistently generate great web content. Fixing various hardware problems on computer and storage devices along with a great knack for fixing Outlook errors, Tony is also the fun-time IT guy for all his work friends. He lives in the San Francisco Bay Area and enjoys cycling.