Overview
This document describes the Letter Generation and Mail Merge processes. These processes are used to extract communication data from M-Pathways and merge it with a Microsoft Word template.
Business Process
The Letter Generation and Mail Merge process consists of the following high-level steps:
- Assign communication
- This is done prior to running Letter Generation and Mail Merge
- Create extract file using Letter Generation
- The Letter Generation process runs in M-Pathways
- Run Microsoft Word Mail Merge Process
- Open Microsoft Word template
- Execute Mail Merge in Microsoft Word
- Verify success and make corrections if necessary
- Print or email merged documents
- Rename and move extract if archiving
Terms
- Critical Data – includes a person’s name and an active address. If there is missing critical data, a communication cannot be produced.
- Data extract file – the data file from M-Pathways containing variable data to personalize communications, such as letters, labels, and emails. Extract files are produced using the Letter Generation process. The extract file is then used with Microsoft Word mail merge.
- Letter extract file names are identified as CCLTRxxx_zzzzzzzz.TXT where xxx = letter code and zzzzzzzz = process instance number.
- Label extract file names are identified as CCLBLxxx.TXT and contain only merge fields required to print labels.
- Trace File – a file that results from running the Letter Generation process which displays any errors. The file name of a trace file is ccltrgen_(process instance number).out. Process instance number is eight digits (e.g., ccltrgen_12345678.out).
- Data source – the term used in Microsoft Word for the data extract file.
Business Process/Transaction Details
Before you run Letter Generation
- Identify the persons and types of communications to be entered into M-Pathways.
- Assign communications using the M-Pathways Communication Management component or the Batch Load of Communications process.
Note: These steps are not necessarily performed by the same person who runs the Letter Generation process and/or creates the mail merge document.
Run Letter Generation
Letter Generation is a process run in M-Pathways to extract communication data based on a number of criteria, including:
- The individual’s ID or all IDs to include in the extract file
- The letter code for the extract file
- The date range for the communications included in the extract file
During the Letter Generation process, you also specify:
- The name and address types to include in your extract file
- (if applicable) The checklist code to include in your extract file
The outcome of the Letter Generation process is a data extract file that can be used with a variety of software tools, including Microsoft Word, to create merged documents. Other items to keep in mind when running Letter Generation are:
Topic | Tip |
---|---|
Creating an Extract File | You must have previously assigned a communication for a specific letter code before you can use the Letter Generation process to extract communication data for that letter code. Once a communication is completed, it is not included in future letter generation files. |
Files Produced | Letter Generation produces several files. The two files ending with “.TXT” are designed to be used with Microsoft Word mail merge.
|
File Name | The name of the extract file varies based on the letter code you entered on the Letter Generation component where xxx = the letter code and zzzzzzzz = the process instance number (e.g., CCLTRC14_12345678.txt). |
Each time you run Letter Generation, the extract file name changes. If you want to overwrite the previous extract file each time you run letter generation, you must change the file name to a consistent format when you save the file. The recommended format is CCLTRxxx.txt, where xxx = the letter code (e.g., CCLTRC14.txt).
Note: If you do not save the data extract with a consistent file name and folder, you will need to re-select your data file each time you open your mail merge template. |
|
Checking for Results | Letter Generation also produces ccltrgen_(instance number).out that summarizes the results and displays any errors. |
Microsoft Word Mail Merge
You can use the extract data file from the Letter Generation process with a variety of software tools to create merged documents, such as letters, labels, or emails. One of the most common tools used to create letters and labels is Microsoft Word. This section focuses on how to use Microsoft Word 2016 to merge data and generate a document.
In Microsoft Word 2016, you can use the Mail Merge Wizard or the Mail Merge Toolbar to merge the M-Pathways data extract with a template to create letters, labels, envelopes, etc.
- The Mail Merge Wizard leads you through each step in the process.
- The Mail Merge Toolbar provides some additional options that aren’t available in the Mail Merge Wizard, but does not lead you through the steps in the process. You should use the toolbar only after you are familiar with the Mail Merge process.
Mail Merge is a three-step process in Microsoft Word:
- Open or create the Word document. This is a template containing the text which remains constant in all your letters.
- Specify the data source. This is the Letter Generation data extract file containing individual data.
- Merge data from the data source into the Word document to create and print new merged documents or to directly email the documents.
Advanced Mail Merge Features:
Microsoft Word Mail Merge is a powerful tool that contains many features. Some of the more advanced features are included in this section.
Mail Merge Toolbar
The Mail Merge Toolbar provides some additional options that aren’t available in the Mail Merge Wizard. You should use the toolbar only after you are familiar with the Mail Merge process. Refer to Create a Mail Merge Document Using the Mail Merge Toolbar for more information.
See Using Mail Merge in Microsoft Word for additional information on the Mail Merge Toolbar.
Fill-in
Fill-in is an option under the Rules menu. It allows you to enter information each time Word merges a new document. The text you type replaces the field in the document. Your response is printed in place of the field. Use when you want to insert your response in just one location. To insert your response in more than one location, use an Ask option.
Use the Insert Word Field: Fill-in dialog box to set up the condition.
When you click OK in the Insert Word Field: Fill-in dialog box, the conditional statement is inserted in the main document: e.g., { FILLIN “Due Date” \d “July 1, 2018” \o }.
If…Then…Else
If…Then…Else is another option under the Rules menu. It does one of two alternate actions, depending upon a condition. It compares two values and then inserts the text appropriate to the result of the comparison.
Use the Insert Word Field: IF dialog box to set up the condition.
When you click OK in the Insert Word Field: IF dialog box, the conditional statement is inserted in the main document: e.g., { IF { MERGEFIELD CitizenshipCountry } = “United States” “U.S.” “International” }.
Related Documents
The following document provides links to templates and sample extract files:
Assign Communications:
Letter Generation process:
Mail Merge process: