Mail Merge
Mail Merge
rs
ve
y
op
ni
U
C
ge
w
ie
id
ev
br
am
-R
-C
s
es
Chapter 17
y
Pr
op
rs
w
ie
ve
y
ev
op
ni
R
C
ge
w
ie
id
ev
br
am
-R
-C
s
es
LEARNING INTENTIONS
y
Pr
op
ve
y
ev
-R
-C
s
es
y
Pr
op
ity
C
rs
w
ie
ve
y
ev
op
ni
R
C
e
w
g
ie
id
ev
br
am
-R
-C
s
es
y
17 Mail merge
op
ni
U
C
ge
w
BEFORE YOU START
ie
id
ev
br
• Do you know how to create documents using a word processor?
am
-R
• Do you know how to create data sources using a database or spreadsheet?
-C
s
es
Introduction
y
KEY WORDS
Pr
op
A mail merge is the automatic process of merging data, mail merge: the automatic addition of data, such
ity
C
such as names and addresses, from a source file into a as names and addresses, from a source file into a
rs
w
master document, such as a letter. You can save time master document, such as a letter
ie
ve
writing the same letter to lots of different people when
source file: the file containing the data that will
y
ev
op
ni
be merged into the master document
R
C
master document: the main document that will
ge
w
ie
id
ev
br
-R
Name Address City Zip Store Account
-C
Pr
Dear :
op
ve
op
ni
Sincerly
R
C
ge
w
ie
id
ev
br
-R
We would like to inform you because We would like to inform you because We would like to inform you because
y
your account - 0156593 has qualified your account - 0156594 has qualified your account - 0156595 has qualified
Pr
you for a special gift. you for a special gift. you for a special gift.
op
Please come in our store in xxxxxx to Please come in our store in xxxxxx to Please come in our store in xxxxxxx to
claim your price. James thank you for claim your price. Carlos thank you for claim your price. Louis thank you for
ity
C
ve
y
ev
op
ni
Merged documents
R
C
e
ie
id
ev
br
am
-R
377
-C
s
es
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
17.1 Mail merge letters
w
PRACTICAL ACTIVITY 17.01
ie
id
Create a master document that you will use to
ev
br
Create a master document
am write to customers of the company IT Distribution
-R
Inc. You should create the letter in a standard
structure letter format, including space for the recipient’s
-C
s
name and address. Your letter should invite
A master document is the main letter, email, memo, fax
es
the customer to participate in a survey with the
or other document that you can send to all recipients
y
Pr
op
ity
online and is available for two months from the
C
rs
w
ie
ve
17.01 Learner letter.docx is a master document.
y
ev
op
ni
school. The words in italics are the data that needs Create a source file
R
C
to be inserted about each learner driver and will be
You need to create a source file that contains the
ge
w
data the computer will include in each mail-merged
ie
id
ev
br
-R
-C
ve
y
Source files can be in a variety of formats including:
ev
op
ni
• database table
R
• database query
ge
the letter and the full name and address of the • word-processed table
am
email contacts.
y
•
Pr
op
ity
C
rs
w
ie
ve
y
ev
op
ni
R
C
e
w
g
ie
id
ev
br
am
-R
378
-C
s
es
y
17 Mail merge
op
ni
U
C
ge
w
PRACTICAL ACTIVITY 17.02 WORKED EXAMPLE 17.03
ie
id
1 Examine the structure of the following 17.01 Learner letter.docx has been linked to the
ev
br
data sources and identify which formats
am Learner table in 17.02 Driving school.mdb.
-R
they are in:
Select Table ?
-C
a 17.03 Student.csv
s
Created Type
es
Car 8/3/2015 11:41:39 AM 9/13/2013 1:15:38 PM TABLE
b 17.04 Student.rtf Instructor 8/3/2015 11:42:29 AM 9/13/2013 12:44:50 PM TABLE
y
Pr
op
ity
C
d 17.06 Student.xlsx
rs
w
OK Cancel
ve
student table)
y
Figure 17.3: Database link.
ev
op
ni
C
the query) The records from the data source are identified in the
ge
w
2 Create a data source using a table in a word
ie
id
ev
br
-R
a forename
-C
b surname
s
es
c email address.
y
Pr
op
rs
w
ie
ve
KEY WORD
y
ev
op
ni
data source
C
ge
-R
location of the data. You therefore need to link the class.docx and link it to each of the
following data sources one at a time. Finish
y
a 17.03 Student.csv
rs
w
b 17.04 Student.rtf
ie
ve
y
ev
c 17.05 Student.txt
op
ni
R
d 17.06 Student.xlsx
C
e
w
g
ie
id
ev
br
am
-R
379
-C
s
es
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
w
CONTINUED PRACTICAL ACTIVITY 17.04
ie
id
e 17.07 Student.mdb (link to the 1 Use the master document 17.08 New class.
ev
br
Student table)
am docx that you linked to the query in the
-R
database 17.07 Student.mdb. Insert merge
f 17.07 Student.mdb (link to the fields for forename, surname and class.
-C
query)
s
Open the letter that you wrote for IT
es
2
Open the letter that you wrote for IT Distribution Inc. and linked to 17.09 Sales
y
Pr
Distribution Inc. Use it as a master document
op
ity
C
Sales processing.mdb.
rs
w
ie
ve
Perform mail merge using the
y
Set up fields
ev
op
ni
C
file only tells the master document which file to use. The sources
ge
w
master document also needs to know which fields to put Now that you have entered the fields, the mail merge can
ie
id
into the document and where to place them. be completed. You need to tell the software to carry out
ev
br
17.10 Learner letter with fields.docx includes the possible to merge the letters to an email address for each
s
es
ve
op
ni
yellow.
R
C
ge
w
ie
id
ev
br
am
-R
-C
s
es
y
Pr
op
ity
C
rs
w
ve
y
ev
C
e
w
g
ie
id
ev
br
am
-R
380
-C
s
es
y
17 Mail merge
op
ni
U
C
ge
w
PRACTICAL ACTIVITY 17.05
ie
id
1 Open 17.10 Learner letter with fields.docx and merge to a new document. Notice how all the records
ev
br
have been included so that there is one letter for every learner.
am
-R
2 As you have added merge fields, use the master document 17.08 New class.docx to merge to a
-C
new document.
s
es
3 Open the letter that you wrote for IT Distribution Inc. Merge the letters to send as emails to the email
y
Pr
op
ity
C
ve
You can edit the source data by making changes to the
y
ev
source file. However, if a master document that is linked 1 Open 17.08 New class.docx that you
op
ni
to the source file is open, then it is possible that the source have already merged with 17.07 Student.
R
C
file will be locked and you won’t be able to edit it. You
ge
w
must remember to close the master document before
making changes to the source file. Any changes made to
ie
id
ev
Distribution Inc, and linked to 17.09 Sales
br
s
es
Pr
op
Thomas’ surname to Donaldson. You can use mail merge to create labels or similar
rs
w
ve
will contain the merge fields from one record from the
R
data source.
ge
w
ie
id
ev
br
am
-R
-C
s
es
y
Pr
op
ity
C
rs
w
ve
y
ev
w
g
ie
id
ev
br
am
-R
381
-C
s
es
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
w
WORKED EXAMPLE 17.07
ie
id
17.11 Instructor Labels.docx has been set up to use You can now add merge fields to the first label.
ev
br
labels. It is set up to use the labels named L7263 which
am
-R
defines the measurements of the label.
-C
s
es
y
Pr
op
ity
C
rs
w
ie
ve
y
ev
op
ni
R
C
ge
w
Figure 17.8: Setting up the labels.
ie
id
ev
br
You can update the rest of the labels to include the same
-R
table from 17.02 Driving School.mdb. A table is
merge fields as the first label. A preview of the labels
created for each label and a <<Next Record>> field is
-C
ve
y
ev
op
ni
R
C
ge
w
ie
id
ev
br
am
-R
-C
s
es
y
Pr
rs
w
ie
ve
y
ev
op
ni
R
C
e
w
g
ie
id
ev
br
am
-R
382
-C
s
es
y
17 Mail merge
op
ni
U
C
ge
w
PRACTICAL ACTIVITY 17.07 WORKED EXAMPLE 17.08
ie
id
1 Create a new word-processing document 17.12 Learner letter with fill-in prompt.docx asks
ev
br
and set it up to contain labels. Link the
am the user to enter the name of the senior instructor
-R
document to the data source 7.07 Student. who will sign the letter.
mdb using the query Qry Student Teacher.
-C
s
Insert Word Field: Ask ?
Using merge fields, create a set of labels that
es
2
shows each student’s name, their class and
y
Prompt:
Pr
op
ity
C
ve
merge labels feature to create a business
y
ev
op
ni
card for each sales representative. You can
R
C
selecting a business card page layout from
ge
w
the label options.
ie
id
ev
OK Cancel
br
Ask once
am
-R
17.2 Manipulating mail- Figure 17.12: Fill-in.
-C
s
es
merge documents The Fill-In prompt rule can be viewed as a merge field
y
code.
Pr
op
many different occasions. There may be some data that Yours sincerely
ie
ve
y
needs to be included within the master document that
ev
op
ni
is not part of the data source but will change each time
R
the mail merge is run. A prompt can be given to the { FILLIN "Which senior instructor will sign the letter?" \o }
C
user. This is a question that asks them what the data Senior Instructor
ge
should be.
ie
id
KEY WORD
am
prompt: a question asked to the user which prompted for the name of the senior instructor.
-C
requires a response
s
es
Microsoft Word ?
y
Ben Dean
ity
C
rs
w
OK Cancel
ie
ve
y
ev
op
ni
C
e
w
g
ie
id
ev
br
am
-R
383
-C
s
es
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
Note that Microsoft Word uses rules to control the way the same for every letter. However, by deselecting ‘Ask once’,
w
mail merge works. Fill-In is one of these rules. It is most you could have a different response for every recipient.
ie
id
commonly used to ask for one item of data that will be the
ev
br
am
-R
PRACTICAL ACTIVITY 17.08
-C
1 Open the master document 17.08 New class.docx to which you have added merge fields. Add a Fill-In
s
es
prompt for the name of the Head of Year.
y
Pr
2 Open the letter that you wrote for IT Distribution Inc. before you completed the mail merge process.
op
Add a Fill-In prompt for the date when the survey will close.
ity
C
rs
w
There are occasions when the same data needs to be Fill-In prompt. The Ask prompt stores the response
ie
ve
included more than once within a document. In these in a bookmark which can be placed in more than one
y
ev
op
ni
situations, an Ask prompt can be used instead of a location in a document.
R
C
ge
w
WORKED EXAMPLE 17.09
ie
id
17.13 Learner letter with ask prompt.docx You now need to reference the bookmark in the document.
ev
br
prompt asks the user to enter the date by which the You can do this by inserting a reference point.
am
rs
w
ie
ve
y
ev
op
ni
R
C
ge
ev
br
-R
Yours sincerely
ity
C
rs
w
ve
op
ni
C
e
ie
id
ev
br
am
-R
384
-C
s
es
y
17 Mail merge
op
ni
U
C
ge
w
CONTINUED
ie
id
You can also view these as merge field codes.
ev
br
am Microsoft Word ?
-R
What date should the information be returned by?
20 January 2017
-C
s
es
y
Pr
op
OK Cancel
ity
C
rs
w
ie
ve
y
When you process the mail merge, you are prompted If you look carefully at the field code for the Ask
ev
op
ni
for the information return date. prompt you will notice that it includes the name of the
R
C
can reference the data by other rules in the same way
ge
w
that data in fields can be referenced.
ie
id
ev
br
am
for the name of the Head of Year and assign a document that is being produced may not need to be
bookmark. Insert references to the bookmark at merged with every record. It is therefore possible to set
ity
C
the end of the document where the Head of Year conditions to select which records will be included in the
rs
w
will sign and a new sentence that will inform the mail merge by using a filter.
ie
ve
op
ni
KEY WORD
R
based on conditions
w
ie
id
ev
br
am
-R
-C
s
es
y
Pr
op
ity
C
rs
w
ie
ve
y
ev
op
ni
R
C
e
w
g
ie
id
ev
br
am
-R
385
-C
s
es
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
w
WORKED EXAMPLE 17.10 WORKED EXAMPLE 17.11
ie
id
17.14 Learner letter with filter.docx has filtered 17.15 Learner letter with sort.docx has sorted the
ev
br
the records so that the letter will only be sent to male
am records by surname and if any surnames are the same
-R
learners whose records haven’t been updated since then by forename.
1 January 2015.
-C
s
es
y
Pr
op
ity
C
rs
w
ie
ve
y
ev
op
ni
C
Figure 17.21: Filter.
ge
w
ie
id
ev
br
records, so the letter will only be sent to those PRACTICAL ACTIVITY 17.10
recipients.
am
-R
1 Open the master document 17.08 New
class.docx that you have added merge
-C
Pr
op
ve
op
ni
-R
Pr
op
content
rs
w
ie
ve
ie
id
ev
br
am
-R
386
-C
s
es
y
17 Mail merge
op
ni
U
C
ge
The other option you can use is a nested IF...THEN…
w
WORKED EXAMPLE 17.12 ELSE rule. This involves using another IF...THEN...ELSE
ie
id
17.16 Learner letter with condition.docx is to rule as the ELSE part of the original IF...THEN...ELSE
ev
br
have a new sentence that asks users to confirm their
am rule. You can only manipulate this in field code view.
-R
gender has been stored correctly. You can see here
how the IF statement was set up. TIP
-C
s
es
Note that the nested IF...THEN… ELSE rule do
y
Pr
op
ity
C
rs
w
ve
y
ev
op
ni
C
ELSE rules within the ELSE parts of previous rules.
ge
w
Figure 17.24: IF…THEN…ELSE.. Our records show that your gender is { IF { MERGEFIELD
Gender } = "M" "Male" }{ IF { MERGEFIELD Gender } = "F"
ie
id
ev
br
are required, you will need to use a different method. files as the outcome or pictures as the outcome. You
ie
ve
One option is to use a series of IF...THEN...ELSE rules may want to research how these can be achieved.
y
ev
not recorded in our records – please confirm your docx which has been merged with the Car
am
-R
gender’. There are now three options: F, M or [blank] in table from 17.02 Driving School.mdb.
17.17 Learner letter with three conditions.docx.
-C
ELSE cannot be used because it would apply the it automatically displays ‘Manual’ instead of
es
second outcome to both of options two and three. ‘M’ and ‘Automatic’ instead of ‘A’.
y
Pr
been used without defining the ELSE part. 3 Open the letter that you wrote for IT
ity
C
Gender } = "M" "Male" }{ IF { MERGEFIELD Gender } = "F" they have a special discount. If they live in
ie
ve
op
ni
Figure 17.26: Separate IFs. to a special 10% discount until the end of
C
this month.’
e
w
g
ie
id
ev
br
am
-R
387
-C
s
es
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
Rules for selecting recipients
w
CONTINUED
ie
id
One method of deciding which records will be included a Add a rule to skip records for customers
ev
br
from the data source is to use a filter. Another method
am who have chosen not to receive
-R
you can use is a rule, which is a merge field code that will marketing (this is a Boolean field that
control which records will be omitted. The rule is called can be TRUE or FALSE).
-C
SKIP IF and this will omit the record from the mail
s
b Add additional rules to skip records for
es
merge if the conditions are met.
customers who are based in New York
y
Pr
(NY), California (CA) or Texas (TX).
op
ity
C
rs
w
ve
field is equal to “M” then the record should be
17.3 Arithmetic
y
ev
skipped.
op
ni
R
operators
U
C
Insert Word Field: Skip Record If ?
ge
Field name:
w
Gender There are occasions when the merged data needs to have
ie
id
ev
br
M
-R
perform this calculation within the data source itself
OK Cancel
and so a calculation can be performed on the merge
-C
Pr
op
rs
ve
op
ni
R
The rule should always be inserted at the beginning of the WORKED EXAMPLE 17.16
ge
as they will still show when previewing the merge. docx has been merged with the Instructor table from
ev
br
-R
class.docx.
y
Pr
ve
Distribution Inc. and remove any filters that Figure 17.30: Instructor letter.
y
ev
ie
id
ev
br
am
-R
388
-C
s
es
y
17 Mail merge
op
ni
U
C
ge
w
CONTINUED CONTINUED
ie
id
The merge codes can be hidden (ALT+F9) to view the
ev
br
am result of the calculation.
-R
-C
s
es
y
Pr
op
ity
C
rs
w
ve
Figure 17.31: Setting up a calculated field.
y
ev
op
ni
C
mean anything. PRACTICAL ACTIVITY 17.13
ge
w
1 Open the file 17.19 Vehicle Data Sheet.docx
ie
id
ev
br
-R
2 Add a calculated field that states when the
-C
Figure 17.32: Bookmark error. MOT (vehicle safety test) is due. The MOT
s
registered.
y
Charge merge field can be inserted in place of ‘charge’ 3 Open the file 17.21 Instructor letter with
ity
ve
-R
Your hourly charge is £{ MERGEFIELD Charge } You can include the current date or time in a document.
rs
w
ve
The amount of tax we collect from this is { ={ MERGEFIELD any document. Each time you open the document or
y
ev
w
g
ie
id
ev
br
am
-R
389
-C
s
es
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
17.4 Document properties
w
WORKED EXAMPLE 17.17
ie
id
You can choose a variety of date and time formats.
ev
Properties of the document can be included
br
Ticking the Update automatically option will ensure
am automatically including:
-R
the date or time is automatically updated.
• filename
-C
s
• author
es
• document title
y
Pr
op
• creation date
ity
C
• number of pages.
rs
w
ie
ve
PRACTICAL ACTIVITY 17.15
y
ev
op
ni
C
created and that includes more than one page.
ge
w
into your document.
ie
id
ev
br
-R
Embedding data
-C
1 Open the file 17.19 Vehicle Data Sheet. document. Any changes you make to the source
ity
C
docx which has been merged with the Car document will be automatically updated in the word-
processed document.
rs
w
ve
KEY WORD
op
ni
at <<time>>’. The date and time should embedding: importing data from a data source
ge
automatically update.
in the new document
ie
id
-R
ity
C
rs
w
ie
ve
y
ev
op
ni
R
C
e
w
g
ie
id
ev
br
am
-R
390
-C
s
es
y
17 Mail merge
op
ni
U
C
ge
w
WORKED EXAMPLE 17.18 WORKED EXAMPLE 17.19
ie
id
17.22 Attendance Report.docx is a report that has 17.22 Attendance Report.docx is a report that has
ev
br
been written to summarise the attendance of students
am been written to summarise the attendance of students
-R
in a school. The attendance data has been embedded in a school. The chart showing attendance data has
from the spreadsheet 17.23 School attendance.xlsx. been embedded from the spreadsheet 17.23 School
-C
s
es
y
Pr
op
ity
C
rs
w
ie
ve
y
ev
op
ni
R
C
ge
w
ie
id
ev
br
-R
automatically in 17.22 Attendance Report.docx
the next time it is opened. Figure 17.39: Embedding a chart from a spreadsheet.
-C
rs
w
ie
ve
op
ni
-R
Pr
op
Similarly, you can embed data into a document from 5 Reopen your report and check that the data
ie
ve
C
e
w
g
ie
id
ev
br
am
-R
391
-C
s
es
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
• printing a copy of the document to read it instead
17.5 Error-free accuracy
w
of reading it on screen
ie
id
ev
br
and proofreading
am • reading the document out loud so errors that may
not be spotted visually are heard
-R
You should carry out a number of checks before • using a blank piece of paper to cover up the rest
completing a mail merge.
-C
s
es
• Run a spell check and grammar check on the individually
y
master document.
Pr
• searching for common errors such as ‘there’ instead
op
ity
C
master document. Even if you run a spell check, it may not spot all the
rs
w
• Visually check for any errors on the preview or errors. These can include words that sound the same
ie
ve
merged documents. but are spelt differently, for example, stationery and
y
ev
op
ni
• Check that the correct records have been included problems with layout, such as spaces that are missing
R
in the filter.
C
or have been added by mistake. Errors in names are
ge
Visual checking could include: not spotted by a spell check and field codes will not be
w
checked by the spell check. A visual check will also be
ie
id
• reading the document from start to finish to see if required to see if all merge fields have been included.
ev
br
-R
WORKED EXAMPLE 17.20
-C
s
es
Pr
op
ity
C
rs
w
ie
ve
y
ev
op
ni
R
C
ge
w
ie
id
ev
br
am
-R
-C
s
es
y
Pr
op
ity
C
ve
The grammar and spell checks have spotted some errors: ‘a anual’ should be ‘an annual’, ‘wood’ should be ‘would’
y
ev
op
ni
The errors highlighted in yellow require visual checking as the grammar or spell checks have not identified them:
C
e
‘record’ should be ‘records’, ‘you’re’ should be ‘your’ and ‘Deane’ should be ‘Dean’.
w
g
ie
id
ev
br
am
-R
392
-C
s
es
y
17 Mail merge
op
ni
U
C
ge
w
CONTINUED
ie
id
The errors highlighted in blue also require visual checking but these may not be spotted until data is actually
ev
br
merged. Here, you can see what the data would look like when merged.
am
-R
-C
s
es
y
Pr
op
ity
C
rs
w
ie
ve
y
ev
op
ni
C
ge
w
There is no space between the forename and surname and there is an additional space after the mobile number.
ie
id
The criteria for the filter are that letters should be sent to male learners whose records haven’t been updated since 1
ev
br
August 2015. This should mean letters going to 11 learners. However, only four letters will be produced.
am
-R
Gender Telephone Mobile Licence number Date updated
-C
s
es
ve
y
ev
op
ni
This has been spotted using a visual check. The error was due to the filter requiring an American layout of date
R
which should be 8/1/15, rather than 1/8/15 that had been used. When corrected, the 11 learners are included.
C
ge
M
br
-R
ve
op
ni
R
w
g
ie
id
ev
br
am
-R
393
-C
s
es
y
CAMBRIDGE INTERNATIONAL AS & A LEVEL IT: COURSEBOOK
op
ni
U
C
ge
w
PRACTICAL ACTIVITY 17.17
ie
id
1 Open the master document 17.26 New class errors.docx. Check the master document and merged
ev
br
letters for accuracy. The merged letters should be sent to students in classes 9F or 9B.
am
-R
2 Change the filter so that the letter is sent to students in classes 9F or 9B.
-C
s
es
y
Pr
REFLECTION
op
ity
C
1 How long would it take you to write 100 personalised letters to customers without using mail merge?
rs
w
ve
How could you apply what you have learnt about mail merge to your life? Are there any occasions for
y
3
ev
op
ni
you when mail merge might be useful, for example in your social life?
R
C
4 When you created a mail merge document, did you make any errors? If so, what did you do to
ge
correct them?
w
ie
id
ev
br
am
processing.mdb
es
y
2 Create a product information sheet using mail merge fields from the Product table. The product
Pr
op
information sheet should include the Product ID, Product Name, Quantity Per Unit, Unit Price, Units in
ity
rs
w
ve
4 The product information sheets should only be printed for stock that has NOT been discontinued.
y
ev
op
ni
5 At the top of the product information sheet should be the date the sheet is printed. This should
R
6 At the bottom of the document should be the name of the person who printed the document. This
ie
id
7 Use the word field SKIP IF to skip any products that are in Category ID 3.
am
-R
8 If the Unit Price is above $60 then the phrase ‘HIGH VALUE ITEM’ should be displayed.
-C
9 The Sale Price should be displayed. The Sale Price is 30% on top of the Unit Price.
es
y
rs
w
ie
ve
y
ev
op
ni
R
C
e
w
g
ie
id
ev
br
am
-R
394
-C
s
es