Published at: 2026-09-17
Create a word document
Use the variable generator to obtain variable codes, edit the Word file locally, and upload it to create a custom Word print template.
Overview
Word print templates let you upload a pre-designed Word document directly (independent of the template designer) as a print template. By using variable codes generated by the variable generator, you can flexibly adjust table and paragraph styles locally. This feature supports printing signature fields, headers, footers, and page numbers, and has extended support for image fields and signature fields on related objects.
Before you begin
[!IMPORTANT] - Permission requirements: You must have system administrator permissions or be granted print template management permissions. - Format restrictions: Only.docand.docxfiles are supported, with a maximum file size of 10 MB. - Gray-scale features: - List scope control: Set filter conditions for related list data when printing (requires gray-scale application). - Custom width and height tags: - For image fields and signature fields on related objects, you can use<label> </label>tags to configure width and height (default: width is 50 pixels, height is 0 pixels).
Steps
Step 1: Open the creation page
- In Setup, go to Template Management > Print Templates.
- Click Create Word Template on the left.

Step 2: Configure basic template information
On the creation page, configure the following:
- Template name: Enter a descriptive name.
- Related object: Select the business object to bind. You can download the system-preset Word template as a starting point, or create one locally in Word.
- Scope: Set the employees who can use this template.
- Download file name:
- Custom naming: Concatenate fields, variables, and custom text from the current object (for example,
(Account Name)2022(Gender)). - Restrictions: Image, attachment, large attachment, signature, payment component, check-in component, and location fields are not supported. The name cannot contain the characters
\/:*?"<>|. - Default logic: If left blank, the download file name defaults to
Object Name - Primary Attribute.
- Custom naming: Concatenate fields, variables, and custom text from the current object (for example,


Step 3: Generate and copy variable codes
- Click View Variables or How to Create Word to open the variable generator.
- Variables are divided into two categories:
- Related object list variables (detail list data):
- Select the related object and record type (all record types included by default).
- Set the sort order: ascending or descending. The system defaults to descending order by “Last Modified Time”.
- Data scope filter: Click + Add Condition (up to 5 conditions) to filter related fields. If the corresponding resource package is enabled, “OR” relationships are supported.
- Code generation: After setting filter conditions, the code below updates accordingly. Copy the generated list loop code and paste it into your local Word document.
- Field variables (single-value fields):
- Find the field you want to print, copy the generated variable code, and paste it into the corresponding position in your local Word file.
- Related object list variables (detail list data):
[!WARNING] Make sure the copied variable name is complete. Otherwise, the variable fails during parsing.


Step 4: Upload the template and save
- Complete the Word template layout and variable pasting locally, then save the file.
- Return to the system page and select the file in the Upload File area.
- Click OK to complete the creation.

Expected results
- The new Word template appears in the template list.
- Authorized users on the detail page of the corresponding object can click Print, select this Word template, and download a Word document populated with actual data.
Template management operations
In the template list, you can manage templates as follows:
- Edit: Modify basic information or re-upload the Word file.
- Set as default: Set the current template as the default template for printing.
- Delete: Remove custom templates that are no longer needed (preset templates cannot be deleted).
