Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Using Word's Macro Recorder

From: Word for Mac 2011 Essential Training

Video: Using Word's Macro Recorder

Word's macro features uses VBA or Visual Basic for Applications to create programs that can be used within Word 2011. This feature was available in Word 2004, but was removed, much to the disappointment of Mac Word users, in Word 2008. Now it's back, giving Word users the ability to automate repetitive tasks within their documents. VBA and Word's macro feature are not simple topics. They're extremely complex. Entire books have been written about them.

Using Word's Macro Recorder

Word's macro features uses VBA or Visual Basic for Applications to create programs that can be used within Word 2011. This feature was available in Word 2004, but was removed, much to the disappointment of Mac Word users, in Word 2008. Now it's back, giving Word users the ability to automate repetitive tasks within their documents. VBA and Word's macro feature are not simple topics. They're extremely complex. Entire books have been written about them.

So rather than go off on a tangent about a powerful feature that's beyond the needs of most Word users, I'll focus on the basics: using Word's Macro Recorder. In our example, we frequently receive plain text files from a client that we need to incorporate into formatted Word documents. Unfortunately, the text we receive includes paragraph marks at the end of each line, two spaces between sentences, and straight quotes rather than smart quotes. We can use Words Find and Replace feature to fix all of these problems, but doing so each time a file arrives is time-consuming and tedious.

Word's macro feature can help. Now if you think this sounds far fetched, it isn't. I get files like this from someone I work with all the time and this is one of the ways I deal with them. There are two main things to remember about using the Macro Recorder. First, you can't use the mouse to select anything within your document. Word will not recognize mouse selections. Any selection must be done with keyboard keys or other commands. Second, the Macro Recorder will record everything you do, including mistakes.

For that reason, it's a good idea to plan out the macro thoroughly before you begin. So let's give this a try. I'm going to pull down the Tools menu, come down to Macro, and choose Record New Macro. In the top box here you want to put in a name for the macro. So I'll just call it reformat. The name could be anything you like, but it can't include any spaces. Down below this box here you could put a description. I'm not going to do that for this. We don't really need it. And you can use this pop-up menu to determine where the macro should be stored.

If you expect to use the macro regularly in all your documents leave it set to All Documents (Normal). In this area up here you can assign the macro to either toolbars or keyboard. We'll assign it to a keyboard shortcut. So I'll click the Keyboard button and I get the Customize Keyboard dialog. The macro was already selected at the top of the dialog, so all I need to do is put a keyboard shortcut in here, and the way I do it is I type it in. Now I could type in Command+A but as you can see here that's already assigned to something else.

So what I need to do is find a keyboard shortcut that's not assigned to anything. I'm just going to press Delete to get rid of that and I know that Command+Option+Shift+A is not assigned to anything. You can see it says unassigned, so I'll use that. I'm going to click Assign and then click OK. From this point forward, Word is recording all the steps I do. The first thing I want to do is I want to apply the Normal style to the entire document. I can't select the document by dragging because I can't use the mouse, so I need to use a shortcut key or a menu command for that.

I know that pressing Command+A will select the entire document. So I'll do that. Next I want to apply the Normal style. So I'm going to pull-down the Format menu, choose Style, make sure Normal is selected here, and then click Apply, and that applies the Normal style to the entire document. Now at this point you may be seeing squiggly red underlines and squiggly green underlines under text. That's just the automatic spelling and grammar checkers doing their job. You can ignore them.

The next thing I want to do is position my insertion point at the beginning of the document. Again, I can't click. I need to use the keyboard. So I'm going to press the Up key on the keyboard and because the document is completely selected, that will position my insertion point at the beginning. Next, I'm going to start using Find and Replace to make some changes in this document. I want to keep the spacing between paragraphs like you see here, and that spacing is created by pressing Return twice. There are two paragraph marks in a row, and I want to keep that.

Later I'm going to tell Word to strip out the paragraph marks at the end of each line. Now I don't want it to take up the ones I want to keep, so what I'm going to do is replace them with something else first. So we'll start off by opening the Find and Replace dialog. I'll pull down the File menu, come down to Find and choose Advanced Find and Replace. that will open up this dialog. I'm going to pull it aside a little bit so we could see what we're doing here. Make sure you click the Replace tab, because we want to replace things.

The first thing we want to replace is those double paragraph marks. We want to put in a replace with phrase that's going to be not found anywhere else in the document. So to type in a paragraph mark in the Find and Replace dialog, it's ^p, and I want to find two consecutives ones, so I'll type in ^p again. I'm going to press Tab to go to the Replace with box, and in then I want to type in characters that will not be found anywhere else in the document. So I'll put in something like three @ signs.

Then I'll click Replace All. Word has made 30 replacements. I can press Return, which clicks OK, and that brings you back to this dialog. The next thing I want to do is replace the single paragraph marks that are left. Those are the ones that are at the end of each line. I want to replace those with a space. So I'm going to come up to the Find with box. I'm going to type in ^p. That's the single paragraph mark and I'll replace that with a space. So I'll type in a single space and Replace with.

And again, click Replace All. 77 replacements is fine, click OK. Now I want to replace those @ signs I typed in with two consecutive paragraph marks to get it back the way it was. So I'll find one, two, three @ signs, and select in the bottom box, make sure you select the space that's in there, and you want to replace that with two paragraph marks. So it's ^p^p. And Replace All again, and sure enough it's starting to look better.

Click OK. Now I want to go through and replace any instances of two consecutive spaces with one space. So two spaces there, one space there, Replace All. Great! Made some changes. Click OK. Now I want to replace the straight quotes with curly quotes. In Word in order to do that you make sure that curly quotes or smart quotes is turned on, which they are by default, and then you type in the quote you want to replace. So I want to replace single with single, and again, make sure the spaces are selected and deleted when you put those in. Click Replace.

It only made one replacement in the whole document. Click OK and then again for the double, double quote, double quote. Replace All. It made eight replacements and we're done. So I could dismiss this dialog and that's starting to look pretty good. The last thing we want to do is save this as a Word document. Remember it was originally a text document. So I'm going to go over the File menu, choose Save As, and then in this dialog that appears, I want to choose the folder I wanted to go into, which is folder CH22 in my instance.

I want to choose the Format I want, which is Word Document. I don't want to save it as a text file. We put in the file extension, so it won't overwrite the existing file in there. They have different file extensions. And I can click Save and now I'm done. So I need to turn off the Macro Recorder. I want it to stop recording and save that macro. Pull-down Tools, come down to Macro, choose Stop Recording. Now it's done, we can give it a try. So I'm going to close this document, get rid of this, get rid of this.

I'm going to erase the one that we just had. I'm just going to delete it so it doesn't interfere. And then I'm going to open this up in Word. I'll just drag it on top of Word's icon. When you open a text file in Word it asks file conversion information. This is a Mac OS file with this kind of formatting here. So I'll just click OK and that will open it up and now we'll try the macro. If you remember the keystroke, it was Command +Option+Shift+A. That's the one we gave it.

Again, you can give it anything you like. I'm going to press that. Word does the job. Let's scroll up to the beginning of the document and it's all done. Now that took a few minutes to do, but we saw how quickly Word could do it again. It's a real timesaver once you set it up. It's just one example of how you can use Word's Macro Recorder to automate tasks. Again, you need to think all your steps in advance and make sure you can complete them without using the mouse to select text.

Once your macro is saved to the Normal template it will be available in all documents.

Show transcript

This video is part of

Image for Word for Mac 2011 Essential Training
Word for Mac 2011 Essential Training

95 video lessons · 20918 viewers

Maria Langer
Author

 
Expand all | Collapse all
  1. 5m 6s
    1. Welcome
      1m 8s
    2. Word processing basics
      3m 9s
    3. Using the exercise files
      49s
  2. 21m 53s
    1. Menus, shortcut keys, and toolbars
      3m 43s
    2. The Ribbon
      2m 32s
    3. The Toolbox and the Media Browser
      2m 27s
    4. The Sidebar
      1m 42s
    5. Document views
      5m 24s
    6. Navigating windows and documents
      6m 5s
  3. 13m 40s
    1. Using the Document Gallery
      4m 51s
    2. Creating documents
      1m 51s
    3. Opening, saving, and closing documents
      6m 58s
  4. 14m 20s
    1. Entering text
      5m 33s
    2. Inserting and deleting text
      2m 34s
    3. Using Click and Type to enter text
      3m 26s
    4. Inserting symbols and special characters
      2m 47s
  5. 27m 28s
    1. Selecting and editing text
      6m 34s
    2. Copying and moving text
      7m 1s
    3. Using the Scrapbook
      4m 38s
    4. Undoing, redoing, and repeating actions
      4m 36s
    5. Finding and replacing text
      4m 39s
  6. 24m 50s
    1. Font formatting basics
      9m 0s
    2. Applying font formatting
      7m 12s
    3. Using the Font dialog
      4m 35s
    4. Formatting with the Find and Replace dialog
      4m 3s
  7. 27m 18s
    1. Paragraph formatting basics
      9m 39s
    2. Setting justification and line spacing
      2m 17s
    3. Indenting paragraphs
      4m 37s
    4. Using list formats
      5m 41s
    5. Setting paragraph formatting options
      5m 4s
  8. 14m 33s
    1. Understanding tab tables
      4m 15s
    2. Creating a tab table with the Ruler
      5m 20s
    3. Creating a tab table with the Tabs dialog
      4m 58s
  9. 20m 31s
    1. Understanding styles and themes
      2m 36s
    2. Applying styles
      6m 32s
    3. Reformatting with Quick Style sets and themes
      2m 37s
    4. Modifying styles
      4m 28s
    5. Creating and deleting styles
      4m 18s
  10. 13m 22s
    1. Revealing formatting
      4m 24s
    2. Using the Format Painter
      1m 38s
    3. Creating drop caps
      3m 34s
    4. Using AutoFormat on text
      3m 46s
  11. 27m 29s
    1. Setting margins
      4m 3s
    2. Adding page and section breaks
      4m 54s
    3. Setting multiple columns
      8m 11s
    4. Varying page orientation within a document
      2m 43s
    5. Inserting page numbers
      2m 47s
    6. Adding watermarks and background images
      4m 51s
  12. 13m 39s
    1. Using built-in headers and footers
      5m 34s
    2. Manually creating headers and footers
      4m 0s
    3. Setting multiple headers and footers in a document
      4m 5s
  13. 18m 54s
    1. Creating a cell table
      3m 42s
    2. Entering and formatting table text
      4m 16s
    3. Modifying table structure
      5m 34s
    4. Using table styles
      2m 49s
    5. Converting between tab and cell tables
      2m 33s
  14. 18m 12s
    1. Adding borders to text and paragraphs
      5m 38s
    2. Adding borders to table cells
      3m 47s
    3. Setting page borders
      4m 13s
    4. Applying shading
      4m 34s
  15. 16m 56s
    1. Using the Media Browser to insert media
      3m 24s
    2. Inserting media from a file
      2m 36s
    3. Formatting images
      4m 30s
    4. Wrapping text around an image
      2m 27s
    5. Inserting and formatting a text box
      3m 59s
  16. 13m 17s
    1. Using AutoCorrect and AutoFormat As You Type
      9m 26s
    2. Using AutoText and AutoComplete
      3m 51s
  17. 17m 28s
    1. Building an outline
      4m 26s
    2. Rearranging outline components
      3m 39s
    3. Viewing outlines
      4m 9s
    4. Numbering outline headings
      5m 14s
  18. 26m 49s
    1. Checking spelling and grammar
      8m 19s
    2. Using reference tools
      4m 30s
    3. Inserting footnotes and endnotes
      6m 27s
    4. Using the Word Count feature
      2m 49s
    5. Compiling a table of contents
      4m 44s
  19. 17m 44s
    1. Adding comments
      2m 46s
    2. Tracking changes
      7m 45s
    3. Merging and comparing documents
      4m 28s
    4. Sharing documents with others
      2m 45s
  20. 18m 54s
    1. Using letter templates
      8m 5s
    2. Creating envelopes
      6m 23s
    3. Creating labels
      4m 26s
  21. 12m 36s
    1. Setting Document Security options
      9m 0s
    2. Using Privacy options
      3m 36s
  22. 14m 31s
    1. Setting Page Setup Options
      4m 12s
    2. Previewing a document
      2m 13s
    3. Printing to a printer
      4m 11s
    4. Printing to PDF
      3m 55s
  23. 11m 9s
    1. Using Word's Macro Recorder
      9m 18s
    2. Understanding macro security
      1m 51s
  24. 12m 28s
    1. Customizing toolbars and menus
      6m 0s
    2. Customizing Word's shortcut keys
      3m 38s
    3. Customizing the Ribbon
      2m 50s
  25. 42s
    1. Goodbye
      42s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Word for Mac 2011 Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.