Overview
Merge fields and content controls connect a template or precedent to OneLaw and InfoSheet data, so an assembled document is complete and accurate. A merge field writes its value when the document is assembled. A content control inserts a value that stays editable in the assembled document. Both are inserted from the Fields tab of the OneLaw Templates panel. This article covers inserting merge fields and mapping content controls. It does not cover signature placeholders; see Configure Signature Placeholders and Rules, or general Microsoft Word training.
Note: Click any screenshot to expand it for a clearer view while following the steps.
Who can do this
- System Administrators
- Template Administrators
Before you start
- Check you have Template Administrator access in Word. The Author Templates group appears only for Template Administrators.
- Ensure a base template or precedent is open in Word.
- Ensure you understand the difference between merge fields and content controls.
- Check that any InfoSheet whose fields you want to insert is attached to the document, and embedded (not just referenced) if you plan to use content controls.
Insert a merge field
A merge field tells OneLaw to write a value into the document when it is assembled. Use a merge field for fixed text, formatted values, dates, or conditional logic. At assembly the field is replaced by its value as ordinary text; unlike a content control, it does not remain as an interactive control in the document.
Steps
-
Open the Fields tab
- In Word, on the OneLaw tab, in the Author Templates group, select Show/Hide Editor.
Result: The OneLaw Templates panel opens. - In the panel, select the Fields tab.
Result: The OneLaw Templates panel opens and the Fields tab shows the field tree.
- In Word, on the OneLaw tab, in the Author Templates group, select Show/Hide Editor.
-
Choose the field source
- At the top of the Fields tab, select the source that holds the field you want from the dropdown. Its individual fields then appear in the tree below.
-
Base Fields for OneLaw document fields, such as client, matter, and recipient details.
Note: These field names start with OP. - An attached InfoSheet, listed by its name.
-
Base Fields for OneLaw document fields, such as client, matter, and recipient details.
Result: The field tree updates to show the fields for the selected source.
Note: To add, embed, reorder, or remove InfoSheets, select the InfoSheets… button.
- At the top of the Fields tab, select the source that holds the field you want from the dropdown. Its individual fields then appear in the tree below.
-
Insert the field as a merge field
- In the field tree, select the + beside the field you want, to open its options. You can also double-click the field.
- Under Bind as, select Merge field.
- Set any of these options as needed (all optional; which ones appear depends on the field type):
- Value (Choice fields with additional values): select the Main value or one of the field's additional values. The panel previews an additional value as you select it.
- Format: choose a date or number format, or a text case. For a whole number you can also show it as words with As Text, or as a position with Ordinal or Ordinal words.
- Preserve formatting during updates: tick to keep the surrounding formatting when the field updates.
- If NULL: choose what happens when the value is empty (Keep, Remove new-line, or Remove paragraph).
- Advanced formatting: expand for Text before and Text after, and, on the relevant field types, to make a word agree with a number (Quantity) or pluralise a value (Pluralise).
- Place the cursor where the field should go, then select Insert at cursor.
Result: The merge field is inserted, shown as its field name, for example «OP.DocumentDate». It populates when the document is assembled.
- In the field tree, select the + beside the field you want, to open its options. You can also double-click the field.
Map a content control
A content control inserts a value that appears in the document but stays editable afterwards. Use a content control when the value should be visible and changeable before the document is assembled.
Steps
-
Open the Fields tab
- In Word, on the OneLaw tab, in the Author Templates group, select Show/Hide Editor.
Result: The OneLaw Templates panel opens. - In the panel, select the Fields tab.
Result: The OneLaw Templates panel opens and the Fields tab shows the field tree.
- In Word, on the OneLaw tab, in the Author Templates group, select Show/Hide Editor.
-
Choose the field source
- At the top of the Fields tab, select the source that holds the field you want from the dropdown. Its individual fields then appear in the tree below.
-
Base Fields for OneLaw document fields, such as client, matter, and recipient details.
Note: These field names start with OP. - An attached InfoSheet, listed by its name.
-
Base Fields for OneLaw document fields, such as client, matter, and recipient details.
Result: The field tree updates to show the fields for the selected source.
Note: To add, embed, reorder, or remove InfoSheets, select the InfoSheets… button.
- At the top of the Fields tab, select the source that holds the field you want from the dropdown. Its individual fields then appear in the tree below.
-
Insert the field as a content control
- In the field tree, select the + beside the field you want, to open its options. You can also double-click the field.
- Under Bind as, select Content control.
- Set any options the field offers. Most fields have none; the exceptions are:
- Format (Date fields): choose a date format.
- Value (Choice fields with additional values): select the Main value or one of the field's additional values. The panel previews an additional value as you select it.
- Place the cursor where the control should go, then select Insert at cursor.
Result: An editable content control is inserted and bound to the field. Its value can be changed in the document before it is assembled.
-
Name the content control (optional)
Naming a mapped content control makes complex templates easier to maintain, especially with repeated field types or conditional structures.
- Select the content control in the document.
- On Word's Developer tab, select Properties.
Result: The Content Control Properties window opens. - Enter a meaningful name in the Title field.
- Select OK.
- Select the content control in the document.
Edit, convert, or remove a field
You can change or remove a field you have already placed, without deleting and re-creating it. This applies to both merge fields and content controls.
Steps
-
Select the field
- Place the cursor on the field in the document. At the top of the Fields tab, a breadcrumb shows its location, for example Document › DocumentDate, and an Edit button appears.
-
Select Edit
- Select Edit to open the field's options.
Result: The field's format and options open (where the field has any), along with controls to convert or remove it.
- Select Edit to open the field's options.
-
Change, convert, or remove the field
- Change any format or options.
- Select Convert to merge field or Convert to content control to change how it binds.
- Select Remove from document to delete it.
Result: The field updates in place, or is removed.
Result
You have inserted merge fields and mapped content controls from the Fields tab. These fields populate during document assembly: merge fields write fixed values into the document, and content controls insert values that stay editable in the assembled document.