Word 2013 - Mail Merge and Macros - studentFINAL
Word 2013 - Mail Merge and Macros - studentFINAL
Word 2013:
Mail Merge and
Macros
To w s o n U n i v e r s i t y
O f f i c e o f Te c h n o l o g y S e r v i c e s
OT S Training
Word 2013: Mail
Merge and
Macros
Word 2013: Mail Merge and Macros
Part Number: 222777
Course Edition: 1.0
Acknowledgements
PROJECT TEAM
Notices
DISCLAIMER
While Logical Operations, Inc. takes care to ensure the accuracy and quality of these materials, we cannot guarantee their
accuracy, and all materials are provided without any warranty whatsoever, including, but not limited to, the implied warranties of
merchantability or fitness for a particular purpose. The name used in the data files for this course is that of a fictitious company. Any
resemblance to current or future companies is purely coincidental. We do not believe we have used anyone's name in creating this
course, but if we have, please notify us and we will change the name in the next revision of the course. Logical Operations is an
independent provider of integrated training solutions for individuals, businesses, educational institutions, and government agencies.
Use of screenshots, photographs of another entity's products, or another entity's product name or service in this book is for editorial
purposes only. No such use should be construed to imply sponsorship or endorsement of the book by, nor any affiliation of such
entity with Logical Operations. This courseware may contain links to sites on the internet that are owned and operated by third
parties (the "External Sites"). Logical Operations is not responsible for the availability of, or the content located on or through, any
External Site. Please contact Logical Operations if you have any concerns regarding such links or External Sites.
TRADEMARK NOTICES
Logical Operations and the Logical Operations logo are trademarks of Logical Operations, Inc. and its affiliates.
® ® ®
Microsoft Office Excel 2010 is a registered trademark of Microsoft Corporation in the U.S. and other countries. Microsoft Office
® ® ®
Outlook and Microsoft SharePoint are also registered trademarks of Microsoft Corporation in the U.S. and other countries. The
other Microsoft products and services discussed or described may be trademarks or registered trademarks of Microsoft Corporation.
All other product and service names used may be common law or registered trademarks of their respective proprietors.
Copyright © 2012 Logical Operations, Inc. All rights reserved. Screenshots used for illustrative purposes are the property of the
software proprietor. This publication, or any part thereof, may not be reproduced or transmitted in any form or by any means,
electronic or mechanical, including photocopying, recording, storage in an information retrieval system, or otherwise, without
express written permission of Logical Operations, 500 Canal View Boulevard, Rochester, NY 14623, (800) 456-4677. Logical
Operations’ World Wide Web site is located at www.logicaloperations.com.
This book conveys no rights in the software or other products about which it was written; all use or licensing of such software or
other products is the responsibility of the user according to terms and conditions of the owner. Do not make illegal copies of books
or software. If you believe that this book, related materials, or any other Logical Operations materials are being reproduced or
transmitted without permission, please call (800) 456-4677.
Word 2013: Mail Merge
and Macros
Lesson Labs.................................................................................41
Glossary...................................................................................... 45
Index...........................................................................................49
1 Using Mail Merge
Lesson Time: 50 minutes
Lesson Objectives
In this lesson, you will:
• Perform a mail merge.
• Merge envelope and label data.
• Create a data source using Word.
Lesson Introduction
You have seen how using a template can speed along the formatting of your documents.
Another useful feature is being able to customize documents for individual recipients. If you
have a list of the names, addresses, or other information that needs to go into each separate
document, you can use the mail merge feature to customize the documents, which is what
you will do in this lesson.
2 | Word 2013: Mail Merge and Macros
TOPIC A
The Mail Merge Features
If you have a document with static text, but you need to personalize it with the recipient’s name and
address, you can use the mail merge feature. Rather than manually entering the name and address on
each document, you can merge that data into your document, which greatly reduces the time needed
to prepare the documents. In this topic, you will perform a simple mail merge in a document.
Mail Merge
Mail Merge Fields and Amail merge is a process by which a list of data is inserted into a document to create multiple
Merge Results individualized documents. A main document contains the static information that will be in all of the
documents. It also contains fields into which the variable data will be inserted. The data source is a
list, a database, a spreadsheet—any type of structured data—that is inserted into the main document
during a mail merge. Examples of customized documents you can create include letters, envelopes,
labels, and phone and address books.
Note: The main document is an ordinary Word file into which you have inserted merge fields.
If you want to
demonstrate the items
covered in the concepts
in this topic, you can
start a mail merge now
and then as you go
through this topic, you
can demonstrate the use
of each of the items
discussed.
Data Source in a Word
Table
Figure 1-4: If the data source uses different field names than those listed in the Address Block,
you need to match mail merge fields to fields in the source document.
Figure 1-5: You can configure the Greeting Line field through the Insert Greeting Line dialog box.
Figure 1-6: The dollar value was added using the More Items mail merge field.
Figure 1-8: The mail merge IF rule specifies which field to compare, what to compare it to, and
what to insert in the document if it is true or false.
Data Sources
A data source is a document in which information is listed in columns and rows. The columns are Mail Merge Data
categories of information. Each row contains the records for one set of data. The top row of the Sources
data source is the header row, which identifies the category of information in that column. The data
source can be:
• A database. Have students share
what types of files they
• An Outlook Contacts list or address book from another email program. expect their data
• Word tables. sources to be.
• An Excel worksheet.
• Comma separated value (CSV) or tab separated text files.
Step Description
1) Create the main This document contains the static text and graphics that will be
document. included in all of the merge documents.
2) Connect the main The data source contains the variable data. It can be an existing
document and data source. document, or you can create a list within the Mail Merge Wizard.
3) If desired, specify which A copy of the main document is generated for each record in your
records to include. data source. If you only want to create documents for specific
records, you can specify which records to include. For example, only
records with a specific zip code or only records for people with a
failing test score.
4) Insert merge fields into Insert the fields from the data source into the main document to link
the main document. them together. The data source information will replace the
placeholder merge fields during the mail merge.
5) Preview and print or You can preview each of the documents prior to printing or
email the documents. emailing the merge documents.
Figure 1-9: MAILINGS tab before a mail merge is started (top) and after (bottom).
Step Description
You don’t have to complete the merge all at once. You can save your main merge document. When
you open the document later, the associated data source is also opened. Open the Mail Merge task
pane to finish the merge.
Figure 1-10: You can manually insert fields using the Insert Merge Field dialog box.
Use the Address Fields option to select a built-in field that wasn’t included in one of the
predefined merge blocks you inserted. You also need to use this if the field names in your source
data document do not match those in the merge wizard.
Use the Database Fields option to insert a field that is not in the predefined list of fields.
Mail Merge Recipients
Mail Merge Recipients Dialog Box
The Mail Merge Recipients dialog box is accessed in step 3 of the Mail Merge Wizard when you
select Edit recipient list, or if you are done with the wizard or manually inserting fields, in the Start
Mail Merge group, select Edit Recipient List.
Use this dialog box to add, remove, or edit recipients in the list. You can also sort, filter, find
duplicates, find recipients, and validate addresses.
Select Sort or Filter to display the Query Options dialog box. The Filter Records tab has options
to select the field to filter by, a comparison operation, and what to compare. The Sort Records tab
has options for which field to sort by and the sort order.
Figure 1-12: This SQL warning message is displayed when you open a source document that has
been attached to a data source document.
2. On the MAILINGS tab, in the Start Mail Merge group, select the Start Mail Merge drop-
down and then select the type of merge document to create. The choices are Letters, E-mail
messages, Envelopes, Labels, and Directory.
3. In the Start Mail Merge group, select Select Recipients. The choices are Type new list, Use
existing list, and Select from Outlook Contacts.
4. If desired, filter or sort the data source.
a. Select Edit recipient list.
b. Select a field name drop-down and select a filter to filter which records to include in the
merge.
c. Deselect any records to exclude from the merge.
d. Select OK.
5. Position your cursor where you would like to insert a merge field. Be sure to add spacing and
punctuation around the field as needed.
6. In the Write & Insert Fields group, insert the merge fields or merge field blocks.
a. If desired, select Address Block to insert the name and address of recipients.
b. If desired, select Greeting Line to insert and configure the greeting for a letter.
c. If desired, select Insert Merge Field to select a field name from the list of available fields.
d. If necessary, select Match Fields to match your field name to a default field name.
e. Repeat substep c, and if necessary substep d, for each field you want to insert.
7. If you want to save the merged documents for editing or printing at a later time, in the Finish
group, select the Finish & Merge drop-down and then select Edit Individual Documents.
Specify which records to include in the document and then select OK. Save the document.
8. If desired, in the Write & Insert Fields group, select Highlight Merge Fields to make merge
fields stand out in the document. The shading is not printed; it is just a display feature.
9. If desired, in the Preview Results group, select Preview Results to display the records instead
of the merge fields in the document.
10. If desired, use the Next, Go to Record, and Previous controls to view different recipients in
the merge document.
11. If desired, in the Preview Results group, select Check for Errors to specify how to handle
errors during the merge process.
12. Print the merged documents.
a. In the Finish group, from the Finish and Merge drop-down, select Print Documents.
b. Specify which records to print and then select OK.
c. In the Print dialog box, print the documents the same way you would print other documents.
13. If desired (and if one of the fields in your data source is an email address), email the merged
documents.
a. From the Finish & Merge drop-down, select Send Email Messages.
b. Fill out the fields in the Merge to E-mail dialog box, and then select OK.
ACTIVITY 1-1
Performing a Mail Merge
Data Files
C:\091025Data\Using Mail Merge\Customer data source.xlsx
C:\091025Data\Using Mail Merge\New store flyer.docx
Scenario
You created and got manager approval of the new store flyer that is going to be sent to customers.
The only things your manager would like to change are to add a generic greeting, to add each
customer’s address, and to personalize it a bit for high-volume customers. You realize that this
could all be accomplished using merge fields. You have an Excel spreadsheet with customer names
and addresses you can use for the mail merge.
You should consider
demonstrating this
activity before having 1. Prepare the New store flyer.docx file with merge fields as the main document for the mail merge.
students complete it. a) From the C:\091025Data\Using Mail Merge folder, open New store flyer.docx.
As students work b) On the MAILINGS tab, in the Start Mail Merge group, select Start Mail Merge.
through this activity, be
sure to be available if c) Select Step-by-Step Mail Merge Wizard.
anyone has questions or d) In the Mail Merge pane, in the Select document type section, verify that Letters is selected and then
gets stuck. select Next: Starting document.
e) In the Select starting document section, verify that Use the current document is selected and then
select Next: Select recipients.
2. Select Customer data source.xlsx as the data source for the mail merge.
a) In the Mail Merge pane in the Select recipients section, verify that Use an existing list is selected.
b) Select Browse.
c) Navigate to the C:\091025Data\Using Mail Merge folder and select Customer data source.xlsx.
d) Select Open.
e) Verify that Sheet1$ is selected and that First row of data contains column headers is checked.
f) Select OK.
g) Observe the column names. These will become the field names that are used to merge data in each
record or row from the source document into the main document.
h) In the Mail Merge Recipients dialog box, select OK.
i) In the Mail Merge pane, select Next: Write your letter.
3. Insert the Address block for the inside address on the letter.
a) Position the cursor on the blank line above “Dear Customer.”
b) In the Mail Merge pane, select Address block.
c) Notice that the name, city, state, and zip code are listed in the Preview, but not the street.
d) Select Match Fields.
e) In the Match Fields dialog box, select the drop-down to the right of Address 1 and then select Street.
f) Select OK twice.
4. Replace the generic “Dear Customer” with the Greeting line merge block.
a) Select the text “Dear Customer,” and then press Delete to remove the generic greeting. If you want, you can
b) In the Mail Merge pane, select Greeting line. have each student select
different settings for
c) In the Insert Greeting Line dialog box, in the second drop-down list, select Joshua and then select
Insert Greeting Line,
OK.
then have them walk
around the room or
share their screens
during the preview step
to see how each
document displays the
greeting.
Have students look at 6. Add the Total_ merge field to the second paragraph with alternate text for high-volume and low-volume
the various comparisons customers.
they can use in the IF a) Position the cursor at the beginning of the second paragraph in the body of the letter and then type
rule. Ask them when Last year you spent $
they might use “is blank” b) On the MAILINGS tab, in the Write & Insert Fields group, select the Insert Merge Field drop-down.
or “is not blank”—they c) Select Total_.
might use those when
d) In the Write & Insert Fields group, select the Rules drop-down and select If…Then…Else.
they are sending out
reminders and a Replied e) Fill out the Insert Word Field: IF with the settings shown in the graphic.
column is still blank; the
text to insert might say
“Thank you for your
prompt response” or
“We eagerly await your
reply.”
f) Select OK.
g) Adjust spacing and punctuation as needed around the inserted fields.
TOPIC B
Merge Envelopes and Labels
You have created custom letters using data merged from a list into your main document. You can
also create customized envelopes and labels using merge data, which is what you will do in this
topic. You will see how you can simply merge the address information and print envelopes or labels
as easily as you created merge letters.
11. If you are creating envelopes, select Next: Preview your envelopes. If you are creating labels,
select Next: Preview your labels.
12. Select Next: Complete the merge.
13. Select Print to send the document to the printer, or select Edit individual labels to write them
to a new file that can be saved for later editing and printing.
ACTIVITY 1-2
Merging Envelope and Label Data
Data Files
C:\091025Data\Using Mail Merge\Customer data source.xlsx
Scenario
You have created the personalized letters to send out to customers announcing the grand opening
of the new store. You need to create address labels to affix to the folded letters so you can mail
them to the customers. In the supply cabinet you found Avery 5351 labels. You would also like to
configure Word to remember the store address to use whenever you need to insert the return
address, and then print return address labels.
Be sure that you are
available to assist
students as they work 1. Set the return address to “345 Main Street, Greene, RL 99999.”
through this activity. a) If necessary, open Word.
b) Select FILE→Options.
c) Select Advanced.
d) Scroll down to the General section.
e) In the Mailing address box, type:
f) Select OK.
4. Insert the Address block merge fields and match the field for the Street field.
a) Select Address block.
b) Select Match Fields.
c) From the Address 1 drop-down, select Street, and then select OK twice.
d) Select Next: Preview your labels. The first cell of the table shows the first record from the data
source. The other cells appear blank if Show Field Codes is not enabled; if it is enabled it shows
<<Next Record>>.
TOPIC C
Create a Data Source Using Word
You have seen how to create letters, labels, and envelopes using an existing data source. You will
likely need to create your own data source at some point, and in this topic, you will create a data
source in Word.
Data Sources
Often, someone else will have created a list of data for you to use in a merge document. As
mentioned, data sources can be Word tables, CSV or tab separated text files, Excel worksheets, or
output from a database.
Data Guidelines
When you create a data source, no matter which application you use to create it, follow these
guidelines:
• The top row of the data must be the field names that categorize the data in each column.
• Each field name in the data source document must be unique.
• Field names should begin with a letter, when possible. If the field name begins with a special
character or number, an alpha character is added to the beginning of field names in merge fields
when inserted into a merge document.
• Field names must be less than 40 characters; shorter is better.
• If you use spaces in the field name, they will be replaced with underscores in the merge field
codes, so try to avoid using spaces.
ACTIVITY 1-3
Creating a Data Source Using Word
Data Files
C:\091025Data\Using Mail Merge\Manager promotions.docx
C:\091025Data\Using Mail Merge\Managers data.docx
Scenario
Your manager has finished employee interviews and is ready to send out the notices to the
employees who are being promoted to department managers in the new store. He gave you a list of
names with the department they will manage and their new salary. Instead of entering the
information manually for each new manager, you would like to create a source data document so
that you can merge the data and create the letters all at once.
Point out that this activity
could have used the
1. Examine the Word table to be used as a data source. Step-by-Step Mail Merge
a) From the C:\091025Data\Using Mail Merge folder, open Managers data.docx. Wizard, but that this is
good practice for
b) Notice that this is just a regular table created in Word. performing a merge
c) Close the file. without the wizard.
Students can use the
2. From the C:\091025Data\Using Mail Merge folder, open Manager promotions.docx. wizard if they prefer.
3. Replace the blanks in the document with the appropriate merge fields.
a) On the MAILINGS tab, in the Start Mail Merge group, select the Select Recipients drop-down and
then select Use an Existing List.
b) Browse to the C:\091025Data\Using Mail Merge folder and open Managers data.docx.
c) Select the first set of underscores.
d) In the Write & Insert Fields group, select the Insert Merge Field drop-down and select First_Name.
e) Select the next set of underscores and replace them with the merge field Department.
f) Select the last set of underscores and replace them with the merge field Salary.
Summary
In this lesson, you created customized labels, envelopes, and letters using the mail merge feature in
Word. You also created a data source document in Word for use in a mail merge. This is a useful
feature you are likely to use often if you need to send mass mailings in your organization.
How might you use mail merge in your organization?
A: Answers will vary, but might include: For creating mass mailing labels or envelopes, for creating folder
labels, or for customizing letters that have mostly static text and graphics, but need to be
personalized.
Will you use the wizard or the manual method for creating mail merge documents? Why?
A: Answers will vary, but might include: Using the wizard because it walks you through all of the steps to
create a merge document, or using the manual method if your field names don’t match what the
wizard expects them to be.
Note: Check your LogicalCHOICE Course screen for opportunities to interact with your
classmates, peers, and the larger LogicalCHOICE online community about the topics covered in
this course or other topics you are interested in. From the Course screen you can also access
available resources for a more continuous learning experience.
Encourage students to
use the social
networking tools
provided on the Logical
Choice Home screen to
follow up with their peers
after the course is
completed for further
discussion and
resources to support
continued learning.
Lesson Objectives
In this lesson, you will:
• Automate tasks using macros.
• Create a macro.
Lesson Introduction
You have seen quite a few ways that you can automate tasks throughout this course. If you
have a series of commands and instructions that you perform often, you can group them
together as a single command called a macro. The macro will perform all of the tasks with a
single click.
In this lesson, you will create and use macros to automate tasks in Word. You can create
your own macros, and record the repetitive tasks that you want to add to the macro. You
can also create more complex macros with Visual Basic for Applications.
28 | Word 2013: Mail Merge and Macros
TOPIC A
Automate Tasks Using Macros
Do you wish you didn’t have to perform a long sequence of mouse clicks and keystrokes every time
you format something? It sure can be frustrating. You can bundle all of those mouse clicks and
keystrokes into a single mouse click or keyboard shortcut in a macro.
Macros
Results of Running a A macro is a set of instructions that are accessed and performed with a single mouse click or
Macro keyboard shortcut. Macros are used to automate a group of steps that are performed often. Each
macro must have a unique name within the document in which it is stored. Macros are usually
stored in templates, but can also be stored in documents. If you want the macro to be available in all
of your documents, store it in a global template such as the Normal template.
A template or document that contains macros has a different file extension than other templates and
documents. Instead of .dotx and .docx for regular template and document files, files with macros
end in .dotm and .docm.
Note: This macro inserted a building block from the Quick Parts menu, inserted a header with
text in a different font, formatted italic; had a double-line border added to the paragraph; and
inserted the date and page number in the footer. All of this was accomplished with a single
keyboard shortcut defined to run the macro.
Figure 2-2: You manage macros through the Macros dialog box.
Note: The macros in the Macro name list are the macros from the file selected in the Macros
in drop-down list.
Macro Security
As useful as macros are, they are also a vehicle hackers often use to get their malicious software on
your computer. Macros use Visual Basic for Applications (VBA) programming code, which an
unscrupulous hacker can use to add viruses to a document. For this reason, only use macros from a
trusted source.
Note: Depending on your organization’s needs, the administrator might have set the macro trust
settings so that all macros are disabled in order to prevent macros from running.
Digital Signatures
A digital signature is an electronic mathematical cryptographic method of proving the identity of the
macro publisher. It uses digital certificates issued by a certification authority.
File Validation
File validation is a process that checks any file you attempt to open from an untrusted source to verify
that it is a valid file. This is one way in which hackers can be thwarted from introducing macros with
malicious code into your system.
Trust Center Options
Trust Center
In the Trust Center, you can set the security and privacy settings for Microsoft® Word macros. The
security components you can configure there are listed in the following table.
Trusted Publishers Lists any publishers that are to be trusted. Be sure to check the
expiration date and remove any expired trusted publishers.
Trusted Locations Any location listed in this section is considered secure, so be sure
that a location is secure before you add a local or network path to the
list. Any files in these paths will not go through the file validation
process.
Trusted Documents Specify whether documents on the network should be trusted. You
can also disable trusted documents and clear all trusted documents so
that they are no longer trusted.
Macro Settings Specify whether to enable or disable macros. You can disable all
macros with or without notification, or disable all macros except
those that are digitally signed. Even though it is not recommended,
you can also enable all macros.
Message Bar Specify whether or not a message bar is displayed when macros are
blocked.
Note: Access the Checklist tile on the LogicalCHOICE Course screen to view all How To
procedures for this lesson.
Run a Macro
If you trust the source of the macro, use the following steps to run the macro:
1. Open a document that you want to use a macro in.
2. If prompted to enable or disable macros in the document, and if you trust the source, select
Enable Content.
3. If you know the keyboard shortcut for the macro, press the appropriate keys to run the macro.
4. If a button for the macro has been added to the Quick Access Toolbar, select the button to
run the macro.
5. If no keyboard shortcut has been created, you don’t know the keyboard shortcut, or no button
has been created for the macro:
a. On the DEVELOPER tab, in the Macros group, select Macros to display the Macros
dialog box. Alternatively, you can access the Macros dialog box from the VIEW menu, and
then in the Macros group, select Macros and select View Macros.
b. In the Macro name box, select the desired macro you want to run.
c. Select Run to run the macro, which will perform all of the tasks recorded in the macro.
ACTIVITY 2-1
Automating Tasks Using Macros
Data Files
C:\091025Data\Using Macros\SmothersNewsletter.docm
Scenario
The applications administrator for Smothers & Family Hardware created a new macro, SMacro2, for
formatting documents. You know you can trust the macro because it was created internally. Her
memo explaining how to use the new macro said the keyboard shortcut for it is Ctrl+Shift+Alt+D.
The macro formats documents so that the store name is properly formatted, along with proper
headers and footers. You are ready to add the store name, header, and footer to the document. The
administrator sent the macro as part of a document file, but she said if you add it to your Normal
template, it will be available in any new document.
5. Save the file in the current folder as My Macro Newsletter and then close the file.
TOPIC B
Create a Macro
You have run a macro that was already created. In this topic, you will create your own macro.
Creating macros will help you more quickly perform repetitive, lengthy tasks with a single click or by
pressing the keys for a keyboard shortcut.
Figure 2-4: The Record Macro dialog box is displayed when you select Record Macro.
Note: It is a good idea to include the keyboard shortcut combination in the Description for the
macro.
Macro Names
A macro name must be unique within the file in which it is stored. The name must begin with a
letter and the name cannot contain any spaces. The name can be composed of letters, numbers, and
the underscore, but no other special characters.
Customize Keyboard
Dialog Box
If you forget which keyboard shortcut you assigned to a macro, or if you want to change the If the shortcut key
shortcut key combination, use the Customize Ribbon dialog box to access the Customize combination you select
Keyboard dialog box. There, the current keyboard shortcut is listed. You also have the opportunity is already assigned to
to assign a new keyboard shortcut. something, the Currently
assigned to message
will identify the
Buttons for Macros command to which it is
You can assign a macro to a button that is accessed from the Quick Access Toolbar. Word uses a already assigned. You
can choose to reassign it
default button icon for macros. You can select the macro name and add it to the toolbar, then to your macro or press a
select Modify and select one of the other symbols. different key
combination for the
shortcut key.
VBA
Macros are created in Visual Basic for Applications (VBA). VBA is a programming language embedded VBA Window
in Office applications. It is a subset of the Visual Basic (VB) programming language. While VB can
be used to create standalone applications, VBA programs run within the host application; for
example, within Word or Excel. When you record a macro, it is saved as VBA code. You can view
and edit the VBA code in the Visual Basic Editor.
The Visual Basic Editor interface has a Project pane that lists the VBA modules contained in all Point out that VBA is a
open documents and templates. The Normal template is listed, and each document is listed as a subset of VB. In VB, you
Project. If any templates besides Normal are open, they are listed as Template Projects. can create standalone
applications and VBA
Below the Project pane is the Properties pane. This lists the properties of the selected item in the programming is used to
Project pane. program within an Office
application.
To the right of the Project and Properties panes is the Code window. You can view and edit the
code for the selected project in this window. Each macro that you record is saved in a block of VBA
code. Blocks of code are stored in a module. Each macro within the module is listed as Sub
macro_name() within the module.
Record a Macro
To record a macro:
1. Open a document. This can be the document in which you want to run the macro, or a blank
document. You just need a document open so you can access the Record Macro button.
2. On the DEVELOPER tab, in the Code group, select Record Macro. Alternatively, you can
access Record Macro from the VIEW tab, in the Macros group, from the Macros drop-down
or on the Microsoft Office status bar.
3. In the Record Macro dialog box, in the Macro name text box, type a name for the macro.
4. If desired, assign a keyboard shortcut or a Quick Access Toolbar button to the macro.
5. From the Store macro in drop-down list, select the file where the macro will be stored. Storing
it in the Normal template makes it available to all documents. Storing it in the current document
makes it available only in that document.
6. If desired, in the Description text box, type a description of the macro. If you are assigning a
keyboard shortcut, note the key combination in the description.
7. Select OK to begin recording. The mouse pointer changes to include a Tape icon indicating that
you are in recording mode. The Record Macro button on the DEVELOPER tab changes to
the Stop Recording button.
8. Perform the actions that you want to record in the macro.
9. If you need to pause during the creation of the macro, on the DEVELOPER tab, in the Code
group, select Pause Recording. While paused, the button changes to Resume Recording.
Select Resume Recording when you are ready to continue recording the macro.
10. When you have performed all of the actions that you want to include in the macro, on the
DEVELOPER tab, in the Code group, select Stop Recording.
11. If you are saving the macro to a document:
a. Select FILE→Save As.
b. From the Save as type drop-down list, select Word Macro-Enabled Document.
c. Enter the file name and then select Save.
12. Test the macro. If it is saved to the current document, you can run the macro from the open
document. If it is saved to the Normal template, open a new file to test the macro.
ACTIVITY 2-2
Creating a Macro
Scenario
You like the macro that your application administrator distributed recently, but you don’t need the
store logo in every document that you create. You just want the header and footer with the same
settings as she had in her macro. The header is Smothers & Family Hardware in 11 point, italicized,
Arial Rounded MT Bold font that is centered with a double red underline across the entire page.
The footer has the date and time on the left with the page number on the right. Because you can’t
have spaces in the macro name, you will abbreviate Smothers & Family Hardware Header and
Footer as SH_HdrFtr for the macro name.
Walk around the room 1. Open a new blank document and begin creating the SH_HdrFtr macro.
as students complete a) Open a new Blank document.
this activity to make sure b) On the DEVELOPER tab, in the Code group, select Record Macro.
everyone is able to
c) In the Record Macro dialog box, in the Macro name box, type SH_HdrFtr
complete the activity
without any problems. d) In the Store macro in list box, verify that All Documents (Normal.dotm) is selected so that the macro
is available in all documents based on the Normal template.
e) Select Keyboard.
f) In the Customize Keyboard dialog box, in the Press new shortcut key text box, press Alt+S.
g) Notice that this key combination is shown to be currently unassigned.
h) Select Assign. The Current keys box now lists Alt+S.
i) Select Close. The mouse pointer has a Tape icon attached to it.
Summary
In this lesson, you used a macro that someone else had written and saved to a document. Then you
created your own macro and saved it to the global template, Normal.dotm, so that it is available in
any document you create. Being able to record and run macros will save time when you have to
perform a repetitive series of mouse clicks and keystrokes.
Do you have any tasks that you routinely perform that could benefit from being compiled into a macro?
A: Answers will vary, but might include: Adding standard organization headers and footers to documents,
formatting text, and any other repetitive tasks that you perform on a regular basis.
Note: Check your LogicalCHOICE Course screen for opportunities to interact with your
classmates, peers, and the larger LogicalCHOICE online community about the topics covered in
this course or other topics you are interested in. From the Course screen you can also access
available resources for a more continuous learning experience.
Encourage students to
use the social
networking tools
provided on the Logical
Choice Home screen to
follow up with their peers
after the course is
completed for further
discussion and
resources to support
continued learning.
Lesson labs are provided as an additional learning resource for this course. The labs may or
may not be performed as part of the classroom activities. Your instructor will consider setup
issues, classroom timing issues, and instructional needs to determine which labs are
appropriate for you to perform, and at what point during the class. If you do not perform
the labs in class, your instructor can tell you if you can perform them independently as self-
study, and if there are any special setup requirements.
42 | Word 2013: Mail Merge and Macros
Data Files
C:\091025Data\Using Mail Merge\Vendor Letter.docx
Scenario
You are preparing letters to go out to vendors. They need to be personalized to
indicate the type of merchandise you purchase from the vendor, along with the vendor
contact’s name and address. You will be mailing these out in envelopes that need the
vendor addresses merged into them for printing.
1. Create a data source document named Vendors with five vendor names, addresses, and
one product for each vendor. (You can use Word or Excel to create the data source
document, or you can type the list as part of the merge process—your choice.)
3. In the Vendor Letter file, select your data source document to merge.
4. In the Vendor Letter file, insert the address block for the vendor to replace the
placeholder text for the inside address.
7. Save the merged documents to a file in the current folder for printing at a later time.
9. Save the merged envelope documents in the current folder for printing at a later time.
Data Files
C:\091025Data\Using Macros\Salaries.docx
Scenario
It is time for the annual salary review for staff. Each store is providing the main office with a list of
the employees, their current salaries, and the proposed new salaries. The original form does not have
dollar signs in front of the salaries. When the store president is reviewing this information, he would
like to see the dollar signs. Also, some of the lists are lengthy and it is easy to lose your place. He
would like the tables formatted with banded rows. You have a small table of salaries you would like
to format for his approval before you do the rest of the tables. You realize this could take some time
until you remember that you could do the formatting with macros.
2. Begin recording a macro that adds a $ in front of the Current Salary and New Salary in the first row.
5. Use the macro to add dollar signs to the rest of the salaries in the table.
6. Copy the table and paste the copy below the current table as a separate table. (If you paste it directly
below the current table, it will become part of that table, so insert a blank line between the two tables.)
7. Begin recording a macro that applies a banded table style to the table.
10. Use the macro to apply the table style to the second table.