How To Record A Macro Using Microsoft Word Part 1 (Video)
How To Record A Macro Using Microsoft Word – Part 1

Hi, my name is Philip King, and welcome to this tutorial on Recording A Macro Using Microsoft Word. Today I’m going to show you How To Record A Macro Using Microsoft Word 2003.
This is the first of a three part tutorial.
- Part 1: Recording a Macro
Search and Replace all occurrences of a word or phrase in an open document. - Part 2: Creating Macro Shortcut Keys
Assign a macro to a quick-key and a toolbar button so it can be run quickly. - Part 3: Editing a Macro
How to edit and make changes to macro.
This video tutorial, How To Record A Macro Using Microsoft Word Part 1,
is also available as a HD PDF file for download. You will need Adobe Acrobat 9 or better to view.
Why would you want an macro? Well there’s nothing quite like a macro for getting repetitive work done quickly and although creating macros can seem mysterious it’s really quite simple. So in this three part tutorial I’ll show you the basics of creating, running and changing a macro for Microsoft Word. For my demonstrations I’ll be using Word 2003 but the techniques I’ll show you can be used on any version of Microsoft Word.
First, imagine you’re company has just changed its name and all occurrences of your companies name needs changing in every document you use, i.e., "Old Company Name" needs changing to, "Our Fantastic New Company Name" every time you produce a new document.
Well, we are going to write a macro that does a search and replace in any open documents to change, "Old Company Name" to "Our Fantastic New Company Name" automatically.
If you were to perform this search-and-replace task manually, you would probably use the following procedure:
- Use the Edit/Replace command (Ctrl+H).
- Enter "Old Company Name" in the "Find what" box.
- Enter "Our Fantastic New Company Name" (without the quotes) in the "Replace with" box.
- Click on the Replace All button (Alt+A).
- When Word displays the number of replacements made, you’d select OK and choose Close.
We’ll begin by using a dummy document containing several instances of the old company name.
Old Company Name
"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit…"
"There is no one who loves pain itself, who seeks after it and wants to have it, simply because it is pain…"
Lorem ipsum dolor sit amet, Old Company Name consectetur adipiscing elit. Praesent eget nisi nunc, in tincidunt sem. Phasellus luctus, nulla sit amet convallis dapibus, leo nisi varius nibh, vel tincidunt mauris sapien ac enim. Ut pellentesque iaculis magna, at posuere urna ornare in. Pellentesque pulvinar sollicitudin justo, eu accumsan est molestie sed. Sed dapibus congue dolor sit amet mattis. Mauris velit nulla, ultrices vel adipiscing id, volutpat ac enim. Old Company Name curabitur nisl lacus, eleifend id sodales eu, luctus at turpis. Nulla ipsum purus, feugiat at aliquam sit amet, tristique ac augue. Sed mauris tortor, pellentesque rutrum rutrum nec, sollicitudin eget nulla. Phasellus nec sem magna. Nullam consequat euismod arcu consectetur tempus. Old Company Name nulla quam urna, sagittis imperdiet elementum at, pellentesque quis mi. Etiam sed pretium mi. Proin egestas orci sit amet urna pretium id rutrum tellus ornare. Sed viverra augue quis felis placerat placerat. Old Company Name suspendisse tincidunt mauris sed nibh consectetur quis sagittis enim faucibus. Curabitur quis velit vitae felis posuere tincidunt. In tristique auctor euismod. Proin quis massa et elit lacinia tincidunt. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
We start creating the macro by clicking on the Tools menu tab and selecting the Macro menu item, followed by the Record New Macro menu item.
This will open the Record Macro dialog box where you can enter the name of the macro in the Macro Name input box. It’s best to give your macro a memorable name. (Note: your macro name cannot contain spaces or special characters. Stick with letters, numbers, and underscores).
We want this macro to be available in all documents but if you wanted the macro to only work in a particular template you can choose that in the Store Macros In dropdown dialog box.
When you’ve entered an name click the OK button to continue.
- You are now recording a macro. You know you are recording by the Stop Record Toolbar which will appear somewhere in the windows. You can move this to the menu toolbar for convenience. It has two buttons. The square button is used to Stop the macro recording. The other button, which looks like two vertical lines and a dot, is the Pause/Resume button.
With record on, ensure your cursor is at the beginning of the document by pressing the Ctrl+Home keys. Then click the Edit menu tab, followed by the Replace menu item.
- Alternatively, you could use the shot-cut key sequence Ctrl+H.
This opens the Find and Replace dialog box.
Enter the Find What text, in this case, Old Company Name.
Enter the Replace With text, in this case, New Fantastic Company Name, and click the Replace All button (Ctrl+A).
Word displays the number of replacements made. Choose OK, then select Close.
Stop the macro recording by clicking on the Stop Recording button of the Stop Toolbar. The Stop Toolbar will disappear at this point.
- Alternatively, choose the Tools/Macro/Stop Recording command.
You can see that the old company name has been replaced by the new name.
To demonstrate the macro I’m now going to undo the search and replace to restore the original document (Ctrl-Z).
Now that we have our original document, we can invoke our new macro by clicking on the Tools menu tab.
Selecting Macro and then Macros from the menu items (Alt+F8).
This opens the Macros dialog box where you can select the macro name to run, ChangeCoName.
Click the Run button (Alt+R) and Word runs the macro. It begins at the top of the document, makes the replacements and then stops.
Congratulations, you’ve created a macro.
I hope you enjoyed this session. Don’t forget to let me have your thoughts on this video. See you soon.




![Download [Download]](http://kingsolutions.org.uk/ks/graphics/btn_download_round01.jpg)
