There may be an occasion when you want to send personalized messages with customized details. For example, we want to send letters to recipients confirming that their proposal was accepted. In this letter, we will include the name of the contact person based on the category of the proposal. We can use an If...Then...Else rule to have Word choose the correct contact person.
Available Files
The following files are available for download:
Creating the document
We are ready to send letters to the people whose proposals were accepted. To create these letters, we will begin with a Microsoft Word document that contains the letterhead of the Midwest Cycling Cooperative. We will create the text of the messages by using the merge fields.
Navigate to the downloaded folder.
- To open the Letterhead document,
Double-Click Letterhead.docx
- To begin saving the document with a new name, in Microsoft Word,
Click File, Click Save As
- To select the current name, in the name field,
Press & Drag the current name
- To rename the file, in the name field, type:
Accepted-MM Return key
Examining the data source
Now that the letterhead has been saved with a new name, let's examine the data source. For these letters, we will use the workbook, Reviewed.xlsx. This workbook contains all of the conference proposals as well as columns indicating if the proposal was accepted.
Navigate to the downloaded folder.
- To open the Reviewed workbook,
Double-Click Reviewed.xlsx
The Reviewed workbook contains all of the information for the submitted proposals. Column J indicates if the proposal was accepted. In addition, the accepted entries have been sorted into categories (column K) and assigned a room (column L) and a time (column M).
- Close the Excel workbook.
Filtering source data
The letters we are composing will be sent to the people whose proposals were accepted. Our source file will need to be filtered to show only those entries. Filtering can be done as part of the mail merge process.
- To move to the Mailings tab, on the ribbon,
Click the Mailings tab
- To begin the mail merge for email messages,
Click , Click Letters
- To begin selecting the data source,
Click , Click Using an Existing List...
Navigate to the downloaded folder.
- To choose the correct file,
Double-Click Reviewed.xlsx
- To accept the data source as a trusted file, in the dialog box,
Click
- To use the entire worksheet, in the Open Workbook dialog box,
Click
The correct workbook is now ready to be merged with the document.
Because we are sending this letter only to the people whose proposals were accepted, we need to filter the source data. We can do that now.
- To open the Query Options dialog box,
Click
The Query Options dialog box opens:
This dialog box allows us to filter or sort our source data. We can choose which field to filter, the type of comparison, and the text we want to compare.
We are filtering to see the accepted proposals. Therefore we will filter the Accepted field to show us the Yes values.
- To filter by the Accepted field, in the Query Options dialog box,
Click , Click Accepted
The Comparison field in the Query Options dialog box automatically changes to "Equal to." We want to compare the field to the word "Yes" so the "Equal to" comparison is what we need.
- To compare the Accepted field to "Yes," in the Query Options dialog box,
Click , type: Yes
- To complete the filter process, in the Query Options dialog box,
Click
There is no visible change to the email document. However, when we begin adding merge fields, only the recipients with accepted proposals will be available to us.
Inserting merge fields
Now that the letter is connected to the source data, we can begin inserting the merge fields to create the inside address and greeting line.
- To select the correct location for the address,
Click at the left margin below the letterhead
- To insert the First_Name field,
Click , Click First_Name
- To put a space between the first and last names, on the keyboard, press:
Spacebar
- To insert the Last_Name field,
Click , Click Last_Name
- To move to the next line, on the keyboard, press:
Return key
- To insert the Affiliation field and move to the next line,
Click , Click Affliation, press: Return key
- To insert the street address and move to the next line,
Click , Click Address1, press: Return key
- To add the City field to the address and add a comma and a space,
ClickClick City, press: , Spacebar
- To add the State field and a space,
Click , Click State, press: Spacebar
- To add the Zip field,
Click , Click Zip
With the address block in place, let's move down a couple of lines and add the greeting line.
- To correctly place the cursor, if necessary, on the keyboard, press:
Return key Return key
- To add the greeting, on the keyboard, type:
Dear Spacebar
- To add the First_Name field,
Click, Click First_Name, press: Spacebar
- To add the Last_Name Field,
Click , Click Last_Name, press: Comma key
The letter should look like the following:
With the inside address and greeting line in place, we are ready to add the content to our letter.
Using the If...Then...Else rule
We want to send these letters to recipients confirming that their proposal was accepted. In the letter, we will include the name of a contact person. Which contact person is named will depend on the category of the specific proposal.
In this example, any person whose proposal falls in the Infrastructure category will contact Irma Taylor. All other recipients will contact Iseul Dae-Jung. Instead of creating the letters individually, we can accomplish this using mail merge and an If...Then...Else rule.
We will begin by typing the letter content and using mail merge fields to add the proposal names and categories.
- To move the cursor below the greeting line, if necessary, on the keyboard, press:
Enter key Enter key
- To begin adding the letter content, type:
We have selected your proposal,
- To insert the merge field, Proposal,
Click , Click Proposal
- To add a comma and a space after the proposal name, type:
, Spacebar
- To continue adding content, type:
for this year's conference. We think it would be a good fit for our
- To insert the merge field, Category,
Click , Click Category
- To add a space after the proposal name, on the keyboard, press:
Spacebar
- To end the sentence, type:
series.
The letter should look like this:
We can now create the If...Then...Else rule to insert a contact person based on the category. If...Then...Else rules are commonly used in programming. The concept is binary: if one qualification is met, a certain value is returned or displayed. If the qualification is not met, another value is returned or displayed.
In our example, any recipient with a proposal in the Infrastructure category will be in contact with Irma Taylor. All other recipients should hear from Iseul Dae-Jung.
- To insert a blank line after the first paragraph, on the keyboard, press:
Return key Return key
- To open the Insert Word Field: IF dialog box,
Click , Click If...Then...Else
The Insert Word Field: IF dialog box opens:
We can use this dialog box to build our If...Then...Else rule. We can enter the field that needs to be met (Category) as well as what type of comparison we want to make (Equal to). The following sections give us areas to add the text to be inserted if the category is met as well as text to be inserted if the category isn't met.
- To insert the correct field, in the Field name field,
Click , Click Category
- To select the type of comparison, if necessary, in the Comparison field,
Click , Click Equal to
- To enter the category to be compared, in the Compare to field, type:
Infrastructure
Now that the If statement has been created, we can add the text we want Word to use if the category is Infrastructure and the text to use if the category isn't Infrastructure.
- To add the text to be inserted, in the Insert this text field, type:
Irma Taylor is handling scheduling for that series and they will contact you soon regarding the details.
- To add the text to be inserted, in the Otherwise insert this text field, type:
Iseul Dae-Jung is handling the scheduling for that series and they will contact you soon regarding the details.
- To accept the If...Then...Else statement and close the dialog box,
Click
The result of the If...Then...Else statement appears in the letter. We will review the letters for accuracy in a few moments. For now, let's add a brief signature.
- To place the cursor, on the keyboard, press:
Return key Return key
- To add a signature, type:
Please let me know if you have any questions. Return key Return key Sincerely, Return keyYour Name
- To preview the letters,
Click
The letter should look like this:
The letter is addressed to the first recipient, Diane Dell. We see their address as well as the greeting line. Their proposal was titled E-Bikes: The New Transportation Experience and is part of the Education series. Iseul Dae-Jung is their contact person.
- To preview the remaining letters,
Click several times
- Make edits and adjustments, if necessary.
Completing the mail merge
Now that we are sure our letters are correct, we can complete the mail merge. As always when finishing a mail merge, we have three choices: edit individual documents, print the documents, or email the documents. Let's edit the individual documents. This will create a new Word document that will contain a copy of each letter.
- To merge to individual documents,
Click , Click Edit Individual Documents...
A new Microsoft Word document named LettersX opens. The document contains 15 letters, one for each accepted proposal. At this point, we could edit individual letters, print them, or simply save the document to return to at a later time.
- To begin saving the document, on the keyboard, press:
Command key + S
Navigate to the downloaded folder.
- To name the document, in the File Name field, type:
accepted
- To save the document,
Click
- To close the document, on the keyboard, press:
Command key + W
- To save the changes to Accepted-MM.docx, on the keyboard, press:
Command key + S
- To close Accepted-MM.docx, on the keyboard, press:
Command key + W