mscrm-addons.com logomscrm-addons.com logo
  • Release History
  • Knowledge Base
  • Documentation
  • Contact Support
  • Release History
  • Knowledge Base
  • Documentation
  • Contact Support
home/Knowledge Base/Template Designer(DCP)/HTML Settings for DocumentsCorePack Fields

HTML Settings for DocumentsCorePack Fields

3749 views 5 Updated on April 9, 2025

When including HTML fields into a template, you may need to format them to account for certain HTML complexities or to give your template a specific look and/or feel.  This article covers the properties and settings of the HTML field. 

Note: Some of the features referred to in this article require DocumentsCorePack Template Designer 10.50 and DocumentsCorePack Server 2020.169. Please ensure that both are up to date. 

HTML field properties 

Add an HTML field by selecting ❶ a field within the Standard or Additional tab and clicking on the ❷ Insert Field dropdown.  Under the listed options, click on ❸ Insert as HTML. 

Inserting an HTML field
Figure 1: Inserting an HTML field

Under the field’s properties, we can adjust the ❶ Import Type and the ❷ Encoding. 

The HTML field properties window
Figure 2: The HTML field properties window

Import Type

There are four options under import type. Note that HTML Plain and Single Encoding are deprecated import types available only for compatibility with older versions:

  1. HTML Plain: Apply no encoding upon import.
  2. Single Encoding: For usage with style sheets and if single encoding has been applied to special characters.
  3. Double Encoding: To be used when style sheets are applied in MS Word on the respective field. Apply Double Encoding upon import to handle special characters.
  4. As External Content: To be used when no style sheets are applied in MS Word on the respective field and the source format should be kept.

The default selection is As External Content, which is the native OpenXML and recommended option for inserting HTML.

Selecting the import type
Figure 3: Selecting the import type

For HTML Plain, Single Encoding, and Double Encoding import types, enable❷ Enable HTML Formatting For Fields setting in the Advanced Template Settings under the ❶ General tab to display their contents in the default (“Normal”) Word style. You do not need to activate this setting if you select the As External Content import type.

Enabling the "Enable HTML Formatting For Fields" setting
Figure 4: Enabling the “Enable HTML Formatting For Fields” setting

Formatting HTML fields 

Changing the font of an HTML field in a template will not alter how its contents are displayed in a generated document.  The field will take on the default style of the document instead. Change the default style to modify the appearance of an HTML field’s contents.

Changing the default style to format the HTML field
Figure 5: Changing the default style to format the HTML field
Some example HTML formatted to the changed “Normal” style
Figure 6: Some example HTML formatted to the changed “Normal” style

For hyperlinks within HTML fields, configure the “Hyperlink” style separately to distinguish the link in the generated document. 

Modifying the "Hyperlink" style
Figure 7: Modifying the “Hyperlink” style
An example link being displayed showing the modified style
Figure 8: An example link being displayed showing the modified style

Pre-Processing HTML with Rich Text fields

Sometimes, unintended formatting issues may occur when inserting a rich text field as HTML into a template.  You can resolve this by implementing an HTML pre-processing rule to match the field’s formatting with the rest of your document. To implement this, add the following SettingsKey:

  • Name: HTMLPreProcessingRules
  • Product: DocumentsCorePack
  • Value: Copy and paste the code below:
{

    "RuleSets": [

        {

            "Name": "defaultrule",

            "DisplayName": "Default Rule",

            "Description": "This rule aims to eliminate the default font and size specifications from the HTML generated by the default RichText Control. By doing so, it ensures that the content aligns better with the styling of your document.",

            "DefaultRuleSet": true,

            "Rules": {

            "GlobalStylingRules": [

                    {

                        "styling": "font-family"

                    },

                    {

                        "styling": "font-size"

                    }

                ],

                "NodeTypeRules": [

                    {

                        "nodeType": "div",

                        "attributeRules": [

                            {

                                "attribute": "data-wrapper"

                            }

                        ]

                    }

                ]

            }

        }

    ]

}

Once you save the SettingsKey, restart your Word instance. Once you enable the Processing Rule option in the HTML field properties window, and you can select the rules.

The "Processing Rule" setting, now enabled
Figure 9: The “Processing Rule” setting, now enabled

Note: When this rule is used, rich text fields will display their contents based on the Normal (Web) style, not the default Normal style. Please keep this in mind when using this setting.

You can always remove this rule by deleting the SettingsKey.  To modify or extend this HTML pre-processing rule, please contact support. 

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com!

Was this helpful?

5 Yes  1 No
Related Articles
  • Debugging the Template Design Office Add-In 
  • Introducing the DocumentsCorePack Template Designer Office Add-In
  • Ensuring correct time zone display for DateTime fields
  • How to compare a date-fields with the current date 
  • Create a template for XML or plain text
  • E-Invoicing with DocumentsCorePack
Latest Articles
  • Recap: Nordic Summit 2025
  • The new Template Designer Office Add-In
  • Debugging the Template Design Office Add-In 
  • Updating Legacy SharePoint Connections 
  • What Happens After You Deploy AttachmentExtractor: Storage & Cost Savings in Dynamics 365
Popular Articles
  • DocumentsCorePack Template Designer – Getting Started
  • Step-by-Step: How to configure a One-Click-Action
  • Application Access for Dynamics 365
  • How to find your environment’s unique name in Microsoft Dynamics 365
  • How licenses are counted
Top Rated Articles
  • “Undefined”-labels in Chrome and Edge 114 and higher
  • Important information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack Connector for PowerApps & Microsoft Flow
  • How to insert Condition Fields in DocumentsCorePack Templates designer
  • How licenses are counted
Categories
  • *News and General Infos* 65
  • Webinars 46
  • Template Designer(DCP 197
  • DocumentsCorePack(DCP 260
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 75
  • PowerSearch (PS 50
  • ActivityTools (AT 61
  • SmartBar (SB 54
  • GroupCalendar (GC 47
Our Vision

“We see it as our purpose to provide products that simplify and speed up our customers’ Microsoft Dynamics 365 experience.”

Knowledgebase
LogIn
mscrm-addons.com
  • Products
  • Online Shop
  • Downloads
  • My Account
About Us
  • About Us
  • Case Studies
  • Newsletter
  • Partner Program
  • Contact
Support
  • Support
  • Terms & Conditions
  • Documentation
  • Webinars
  • Legal Documents
  • Impressum
  • © 2025 www.mscrm-addons.com. All Rights Reserved.