In my article, I wrote about creating macros in Microsoft Word, which can run a multitude of repetitive tasks with the click of a button. As a book designer and typesetter, I spend most of my time wrangling with other people’s words, and I find this easier to do in Word than InDesign. Cleaning up other people’s text can be a tedious process, but by creating macros that run through the various Find/Replace routines and dialog boxes necessary for the clean up, you can dramatically speed up the time this takes. Defining (Your) Macros In Microsoft Word, a macro is a series of commands and instructions that you group together as a single command to accomplish a task automatically. Typical uses for macros include speeding up routine editing and formatting, combining multiple commands, and automating a complex series of tasks. What makes macros so powerful in Microsoft Word is that you don’t need to know any code in order to create them.
You tell Word to start recording your actions, go through the actions, and then tell Word to stop recording—that’s it! In essence, you tell Word, “Watch what I’m about to do” and Word will string together the code necessary to accomplish that task. Before you create your macros, you should identify which editing and formatting tasks you routinely run on the text you receive for your projects.
For instance, some of the tasks I always deal with include: removing tab characters, setting the left and right indents of paragraphs to zero, setting the space before and after paragraphs to zero, removing double returns, removing double spaces, removing trailing spaces at the end of paragraphs, changing hyphens between inclusive numbers to en-dashes, etc. Each of these tasks can be their own macro, or combined in a single macro.
Word 2016 Word 2013 Word 2010 Word 2016 for Mac Word for Mac 2011 More. Less You can have Word hyphenate your text automatically as you type your text, or later, in one pass.
![Word For Mac 2018 Wildcard For Inclusive Numbers With Hyphen Word For Mac 2018 Wildcard For Inclusive Numbers With Hyphen](http://3v6x691yvn532gp2411ezrib-wpengine.netdna-ssl.com/wp-content/uploads/2015/06/20150615-CreatingMacrosinWord_3.jpg)
Watch Me, Word To record your first macro, choose the “Record New Macro” command from the Tools Menu ( Tools Macro Record New Macro). The Record Macro dialog box lets you name the macro, decide where you want the macro to be stored—either within the current Word template (so that it will be accessible to all documents opened under that template) or within just the current document—and give a description of the macro.
The Record New Macro dialog box, where you give your macro a name and description. Let’s say you want a macro that adjusts all the margins of the document to zero, so that there are no indents and no space before or after paragraphs. Give your macro a name, keeping in mind that you cannot use spaces in the name, but that spaces will be added before each capital letter when the name of the macro is displayed as a Tool Tip. (Tool Tips appear when you move your cursor over Toolbars and any Palettes you create in Word.) While not strictly necessary, it’s a good idea to write a brief description of all the tasks the macro accomplishes in the “Description:” field, especially if the macro handles multiple tasks.
Finally, keep the default option “All Documents (Normal)” from the “Store macro in:” drop down box so that the macro is stored in the Word template, thereby making it available to all subsequent documents you open under your current template. Otherwise, the macro is only part of the current open document, which defeats the purpose of being able to use the macro on multiple documents.
When you press “OK,” the first thing you’ll notice is that your cursor has changed to a white, hollow arrow, indicating that you are recording a macro. At this point you should go through all the steps necessary to accomplish your task. For this example, that would be:. Edit Select All (select all the text in the document—otherwise the macro only works on the paragraph that your text cursor is currently in). Format Paragraph (bring up the Paragraph dialog box). Set the Left and Right Indents to zero; Set “Special” to none, so that there is no First Line or Hanging Indent; Set Space Before and After to zero (adjust your settings as necessary). The Macros dialog box lists the macros in your current document/template and offers other functions related to your macros.
At this point, you might be thinking, “Cool—I’m going to run my macro!” but if you do that, nothing seems to happen. The reason, of course, is because you just went through all the steps that the macro replicates. That’s why it’s important to select “All Documents (Normal)” from the “Store macro in:” drop down box so that the macro is available for other documents.
![Inclusive Inclusive](/uploads/1/2/5/5/125574188/675337683.jpg)
When you open a different document(s), then you can run the macro and amaze all your friends. Besides running your macros, you can step through them command-by-command, edit, delete, and organize them. If you choose to edit them, you’ll be launched into Microsoft Visual Basic, where the code of the macro will be displayed. The Organizer allows you to copy, delete, and rename your macros from one document or template to another. Creating macros that deal with Find/Replace routines is just as easy.