Working with the mail merge feature in Microsoft Word is a time-saving option to create repetitive, custom-tailored documents from letters to contracts to emails to labels and more. A group of merge fields that make up the greeting line of a mail merge document, such as “Dear Mr. Word can automatically insert all the appropriate greeting text, title, and name fields at once, so you don’t have to insert the text and required merge fields yourself. Header Row: Data source information is stored in a table. See How to Add Custom Merge Fields to Document Templates; Answer: For Matters with a Custom Field that is a checkbox, the following Document Template Merge Fields will be available: If the Custom Field is checked in your Matter, this will populate True in your Word document. Typing over a MergeField will not update it so it is important you follow the steps below when you want to alter a MergeField. If you need help inserting MergeFields into Word see Merge DET fields. Step 1 In your Word document, right-click the MergeField you want to modify. Adding Simple Merge Fields Open a Microsoft Word document. Click where you want to place a merge field. In the Insert tab, click Quick Parts and then Field.
-->NOTE: This section is not applicable to Word 2010.
Syntax:
MERGEBARCODE field-argument-1 field-argument-2 [ switches ]
field-argument-1:
field-argument
field-argument-2:
field-argument
Description:
This field is analogous to the field code, MERGEFIELD. Themain difference is that MERGEBARCODE generates a DISPLAYBARCODE field based onthe merge result instead of showing it directly. The syntax of fieldinstruction and supported switches is also different.
The use of field-argument-1is the same as the datafield in the MERGEFIELD field.
field-argument-2is a text string containing the typeof barcode (barcode-type) that will be generated. The valid values(case-insensitive) are: UPCA|UPCE|JAN13|JAN8|EAN13|EAN8|CASE|ITF14|NW7|CODE39|CODE128|JPPOST|QR
The meanings of these values are described in the followingtable:
Field-argument-2 | Barcode Type Description |
---|---|
QR | A QR 2D bar code as specified by [ISO/IEC18004:2006]. |
CODE128 | A Code 128 linear bar code as specified by [AIM-BC4-1995-Code128]. |
CODE39 | A Code 39 linear bar code as specified by [AIM-BC1-1995-Code39]. |
JPPOST | Japanese Postal Service Customer barcode. JPPost is compliant with CBC (Customer Bar Code), which is also known as RM4SCC. |
EAN8|EAN13 | An EAN - International Article Number worldwide bar code for product ID’s (8 digit/13 digit) as specified in [GS1-BARCODE]. |
JAN8|JAN13 | A JAN: Japanese barcode for product ID’s (8 digit/13 digit). JAN8 is an alias of EAN8. JAN13 is an alias of EAN13. |
UPCA|UPCE | A UPC (A&E): US barcode for product ID’s as specified in [GS1-BARCODE]. |
ITF14 | An ITF-14 item-tracking barcode for shipping as specified in [GS1-BARCODE]. |
NW7 | A NW-7 (CODABAR) serial number bar code as specified by [AIM-BC3-1995-Codabar]. |
CASE | USPS barcode – FIM/POSTNET (*2) - barcode for tracking USPS mail. CASE is an alias of ITF14. |
Switches: Zero or more of the followingfield-specific-switches.
Field Switch | Description |
---|---|
h field-argument | The text in this switch's field-argument is an integer that specifies the height of the symbol. The units are in TWIPS (1/1440 inch). |
s field-argument | The text in this switch's field-argument is an integer that specifies a scaling factor for the symbol. The value is in whole percentage points and the valid values are [10, 1000] |
q field-argument | The text in this switch's field-argument is an integer that specifies the error correction level of QR Code. Valid values are [L|M|Q|H]. |
p field-argument | The text in this switch's field-argument specifies the style of a POS barcode (barcode types UPCA|UPCE|EAN13|EAN8). The valid values are [STD|SUP2|SUP5|CASE]. |
x | Fixes the check digit if it’s invalid. |
d | Adds Start/Stop characters for barcode types NW7 and CODE39 |
c field-argument | The text in this switch's field-argument specifies the style of a Case Code for barcode type ITF14. The valid values are [STD|EXT|ADD] |
r field-argument | The text in this switch's field-argument is an integer that specifies the rotation of the barcode symbol. Valid values are [0, 3] |
f field-argument | The text in this switch's field-argument is an integer that specifies the foreground color of the barcode symbol. Valid values are in the range [0, 0xFFFFFF] |
b field-argument | The text in this switch's field-argument is an integer that specifies the background color of the barcode symbol. Valid values are in the range [0, 0xFFFFFF] |
t | Display barcode data (text) along with image |
a | Concatenate all mapped address fields to generate a Japanese Postal Customer Barcode. The field-argument and Barcode-Type arguments and all other switches are ignored when this switch is used. |
[Example: The following field uses the data in BarcodeDatato generate an EAN-13 barcode with default style:
end example]
[Example: The following field uses the data in URL togenerate a QR Code with highest error correction level:
end example]
[Example: The following field concatenates all mappedaddress fields and uses that data to generate a Japanese Postal CustomerBarcode:
end example]
Important: Make sure that you have the appropriate rights assigned to you, as listed in Required TeamConnect User Group Rights.
The purpose of merge fields in a template is to identify specific elements of TeamConnect data that should be retrieved when a document is being generated.
Basic merge fields are merge fields that do not need to follow any specific naming convention. You can specify any name when you define them in the RTF. Each merge field can be mapped to a simple data element in TeamConnect, such as a number, date, text, or list field.
Basic merge fields can be used to identify each of the following types of information:
For example, if a document template is based on a matter, you may want to retrieve the matter name and matter number. To do this, you can create merge fields with names like MatterName and MatterNumber, and this will help you to recognize them when you are mapping them in TeamConnect.
The following table provides examples of basic merge fields for a document template that is based on a project (such as Matter). You would need to map each of these fields manually after uploading the RTF into TeamConnect.
Data to be retrieved | Example merge field name | Sample output |
---|---|---|
Project name (system field) |
| Company X vs. Company Y |
Project number (system field) |
| MATT-1234 |
Involved party selected in a custom field of type Involved |
| Kerry Goldman |
Date from a custom field |
| November 1, 2006 |
Dollar amount from a custom field of type Number |
| $4,000.00 |
Text that the user provides when generating the document |
| jh |
Current date |
| November 21, 2006 |
Content from file (Such as LetterInfo.doc) |
| 'This is a paragraph of information that is shared among several templates and is therefore managed as a separate file.' |
The current user's name |
| Jane Smith |
Using predefined merge field codes to automatically map system fields can save time and reduce errors in the configuration of your document template. When you open the RTF in the Data Mapping tool, TeamConnect does a lot of the mapping for you. See Locating the Data Mapping Toolfor more information.
There are two ways to automatically map system fields:
You can also use predefined merge field codes to automatically map custom fields. See Automatically Mapped Custom Fields.
The following table provides a list of merge field codes that automatically map to certain values, mostly having to do with assignees. These predefined codes make it easy to quickly map merge fields to assignees' contact information. This technique can also be used for custom fields of type Involved, as described in Automatically Mapped Custom Fields.
Note:The technique behind the merge field codes for people is that the colon (:) is replacing the navigation.user.contact or .contact.
Object record type | System field | Predefined merge field code |
---|---|---|
Any record type (matters, tasks, involved parties, and so on) | Current date Note:The date will be formatted using the format specified in System Settings. If you want to use a different format, do not automap the date. |
|
First name and last name of current user from his/her contact record |
| |
Name of user who created the record |
| |
Task | Task assignee's first name and last name Note: These merge fields can be used inside of filter@ or loop@ merge fields that identify task records |
|
Any project (such as Matters) | Main assignee's name information from contact record |
|
Main assignee's contact ID |
| |
Main assignee's default address from contact record |
| |
Main assignee's default email address |
| |
Main assignee's default phone |
| |
Main assignee's default fax |
| |
Main assignee's default Internet address |
| |
Main assignee's default rate |
| |
Main assignee's Social Security number or Tax ID |
|
You can cause system fields to be mapped automatically by following a naming convention in your merge field names:
@attributepath
where attributepath is the object attribute path that points from the starting object to the system field.
Object attributes are listed in Object Model: Read This First. To identify a system field that is related to the main object, create a path of attribute names that leads to the needed system field, delimited by periods (.).
Keep the following points in mind:
The following are examples of merge fields in a document template that is based on a project (such as Matter) that would be mapped automatically.
System field | Required merge field name | Sample output |
---|---|---|
Project name |
| Company X vs. Company Y |
Project number |
| MATT-1234 |
Parent project name |
| Sorrelson Dispute |
Opened On date of project |
| November 21, 2006 |
Name of contact selected in contact-centric field of project |
| Joy Ferguson |
Main assignee first name, last name |
| Michael Ferguson |
Main assignee's default phone number |
| 323-900-1700 |
Involved party's default role (when used inside of a filter@ merge field) |
| OC Attorney |
Project's current phase |
| Intake |
You can use predefined merge field codes to automatically map custom fields. This can save you time and reduce errors in the configuration of your document template. When you open the RTF in the Data Mapping tool, TeamConnect does a lot of the mapping for you. See Locating the Data Mapping Toolfor more information.
Note that when a field is automatically mapped, the formatting is set to default options. For example, an automatically mapped date value will be formatted according to the default date format set in System Settings.
@Detail[categoryTreePosition]/customFieldName
@Detail[CLMS_DEPA]/LiJudgeSettlemtDate
@Detail[PRTP_0013]/PartyDate1
@Detail[MATT_LITI]/InvolvedOCAttorney:name
@Detail[MATT_LITI]/InvolvedOCAttorney:firstName
@Detail[MATT_LITI]/InvolvedOCAttorney:phone
@Detail[MATT_LITI]/InvolvedOCAttorney:street
@Detail[MATT_LITI]/InvolvedOCAttorney:city
@Detail[MATT_LITI]/InvolvedOCAttorney:state
@Detail[MATT_LITI]/InvolvedOCAttorney:postalCode
@Detail[MATT_LITI]/Litigation.name
@Detail[MATT_LITI]/Litigation.numberString
If you followed these steps correctly, the custom field is mapped automatically when you open the RTF in the Data Mapping tool in TeamConnect. See Locating the Data Mapping Toolfor more information.
Tip: If you prefer not to map the custom field automatically, try mapping it manually in the Data Mapping tool, as described in Custom Field Mapping.
If you need to include fields from sub-objects or related objects in the document template, and you do not want the user generating the document to select them from a list, then use loop@ in your merge field codes in the RTF file.
Note:For users of Document Generator, loop@ corresponds to the Document Generator tag tc:loop for sub-objects and tc:search for related objects.
The Data Mapping tool provides you with additional options for filtering the available sub-objects or related objects. For example, you may want to get the business address, not just any address listed for the contact. See Locating the Data Mapping Toolfor more information.
In some cases, even with criteria that you specified, multiple sub-objects or related objects may be found. For example, a contact may have more than one business address. In this case, data from all of them will be listed in the generated document.
For details about how to perform mapping, see loop@ Merge Field Mapping.
Main object for which document template is defined | Related objects/Sub-objects | Object attribute in the Object Navigator |
---|---|---|
Any object (Contact, Matter, and so on) | History | historyList-> |
Project (such as Matters) | Assignees | assigneeList-> |
Project relations (where related project is on left side of relationship) | leftRelationList-> | |
Project relations (where related project is on right side of relationship) | rightRelationList-> | |
Involved | involvedList-> | |
Child or embedded projects | childList-> | |
Tasks | taskList-> | |
Appointments | appointmentList-> | |
Accounts (budgets) | accountList-> | |
Expenses | expenseList-> | |
Contact | Addresses | addressList-> |
Phone numbers | phoneList-> | |
Email addresses | emailList-> | |
Internet addresses | inetAddressList-> | |
Fax numbers | faxList-> | |
Territories | territoryList-> | |
Rates | rateList-> | |
Skills | skillList-> | |
Contact relations (where related contact is on the left side of relationship) | leftRelationList-> | |
Contact relations (where related contact is on the right side of relationship) | rightRelationList-> | |
Invoice | Line items | lineItemList-> |
When NOT to Use loop@
Do not use loop@ under the following circumstances:
Inserting loop@ Merge Fields
To set up loop@ merge fields for sub-objects or related objects
For example:
The local office is located at the following address:
<<loop@partyAddress>><<street>>
<<city>>, <<state>> <<zip>>
<<loop@>>
This would generate the following:
The local office is located at the following address:
124 North Woodranch Road
Glen Oaks, CA 94551
For details about how to map these merge fields to TeamConnect data, see loop@ Merge Field Mapping.
Using filter@ merge fields causes the document generator to pause at runtime and prompt the user to make a selection before the generator continues.
If you want the user to select related objects or sub-object(s) from which data must be retrieved, use filter@ merge fields. The Related and Sub-objects Available Through @filter or @loop tableprovides a list of related objects and sub-objects that the user can select for including data in the generated document.
When you use filter@ to define merge fields, you specify which related object records or sub-objects the user can select while generating the document. Data is then pulled into the document from the user-selected related records or sub-objects.
You can also nest a filter within another filter. For example, if you need the user to select a child project, and then select an assignee, you would nest one set of filter@ merge fields within another.
Note:filter@ corresponds to the Document Generator tag tc:filter.
You should not use filter@ in the following circumstances:
To set up filter@ merge fields for related or sub-objects
For example:
The following parties are participants in this matter:<<filter@Participants>><<@contact.firstName>> <<@contact.name>>,
<<@defaultCategory.name>> <<@Detail[PRTP]/AgencyNumber>>
<<filter@>>
This would generate the following, if several related objects are retrieved:
The following parties are participants in this matter:
Reingold & Silverman, Outside Counsel Firm A-3433
John Silverman, Outside Counsel Attorney A-3434
Susan Yessler, Judge/Arbiter A-3420
For details about how to map these merge fields to TeamConnect data, see filter@ Merge Field Mapping.
If you need the document generator template to include certain content only under a certain condition, use if@ merge fields.
The conditional content can include document content, such as text, and any other types of merge fields (basic, automatically mapped, loop@, and filter@ merge fields).
An if@ merge field can do any of the following:
You define what the condition is that you need to check when you map the merge field to TeamConnect data.
Note:if@ corresponds to the Document Generator tag tc:conditional.
To set up if@ merge fields to identify conditional content
For example:
<<if@LitigationCategoryAdded>> If the condition is true, you will see the content of a related file.
Content of another file:
<<ImportedFileContent>>
<<if@>>
If true (that is, if the Litigation category exists), then the output in the generated document would be as follows:
If the condition is true, you will see the content of a related file. Content of another file:
'This is a paragraph of information that is shared among several templates and is therefore managed as a separate file.'
For details about how to map the if@ merge field to define the condition, see if@ Merge Field Mapping.
To upload RTF files to TeamConnect, and then map RTF merge fields to TeamConnect data, you must first locate the Documents Template folder.
The Document Templates folder can contain the following, as shown in the Document Templates Folder Example image:
The Document Templates folder also contains the icon that opens the Data Mapping Tool.
Once you open the Document Templates folder, you can view the contents or select one of the following icons to perform a task.