DOCX templates allow you to merge data from Salesforce into Microsoft Word DOCX documents. They are built in Microsoft Word and uploaded to Salesforce for generation.
DOCX templates allow you to leverage the feature functionality of Microsoft Word, enabling you to create documents with extensive formatting with no HTML/CSS experience required. You can easily insert tables and tables of contents, and utilize other features like redlining and restricted editing. This format is useful for users who are already proficient in Microsoft Word. If you have existing Microsoft Word DOCX documents, you won't need to rebuild them when you use this format.
|HTML/CSS Source Editing|
|Template Header & Footer|
|Insert Component Templates|
|Mass Merge (Batch Generation)|
|Collect e-signatures with S-Sign|
DOCX templates are recommended for smaller, non-data-driven documents that need to be output as Microsoft Word DOCX files.
DOCX templates are also recommended for documents that require extensive editing after generation.
Consider the following DOCX template limitations.
- Inserting extensive merge fields or related lists can be difficult, since they need to be copied from the S-Docs template editor and pasted into your DOCX document. In addition, all dynamic content (merge fields, related lists, conditional logic, etc.) must follow special syntax (see below).
- Your uploaded template has an upper limit of 10 related lists
- Your uploaded template has an upper limit of 10 pages. Generated documents have an upper limit of 20 pages
- Documents generated via S-Docs Jobs or Mass Merge must have a final size of less than ~120 KB
- Runtime Prompt inputs with rich text formatting are not supported
- Simpler related lists are supported, but more complex related list qualities like using <td> cells as column prefixes are currently not supported
- For rich text fields:
- Line breaks, images, and ordered/unordered lists are retained. All other formatting (such as bold text and alignment) is removed.
- If a list begins on line 1 of the rich text field, a blank line will be inserted above it.
- Fonts and font sizes will not be pulled from Salesforce rich text fields into your DOCX document - they will simply match Microsoft Word's "Normal" style. If you want your document to display the font from your rich text field, you can either change Microsoft Word's "Normal" style to match the desired font/font size, or use the font-family and font-size merge field attributes
- Generating a DOCX document without creating an Attachment or File is not supported
- DOCX templates cannot have a Related To Type of OpportunityLineItem, QuoteLineItem, or any other standard Salesforce object that does not support Notes & Attachments
- Percentages as units of measurement in image are not supported. However, absolute sizes (i.e. inches, centimeters, pixels) are fully supported.
DOCX templates have the following special requirements:
- Dynamic content tags (merge fields, related lists, conditional logic blocks, etc.) require special syntax. Click here for more information.