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)/Using Rich Text fields in DocumentsCorePack Templates

Using Rich Text fields in DocumentsCorePack Templates

3871 views 0 Updated on October 2, 2025

Rich text fields are HTML-based editors that allow the user to enter formatted text and images into model-driven apps.  These fields can be inserted into DocumentsCorePack templates via the Insert as HTML button.  This article outlines how this can be done and provides a few examples on how rich text fields can be formatted within a document. 

Inserting rich text using “Insert as HTML” 

To demonstrate how to insert a rich text field, we’ll use this custom rich text field from an account record.

Our rich text content
Figure 1: Our rich text content

To insert a rich text field’s content, open Word and open the Template Designer.  You will need to click on the field to be inserted (“Detailed Description,” in our case), click on the Insert Field button, and then select Insert (field name) as HTML.  This will insert the field into the document. 

Inserting our field as HTML
Figure 2: Inserting our field as HTML

Generating a document based on this template with the field inserted will show the content in the result.  Note that the font style and size is retained in the result. 

Our content within our generated document
Figure 3: Our content within our generated document

Formatting rich text fields 

Sometimes it may be necessary to format your rich text content in a generated document.  The examples below detail some different approaches. 

Example – Formatting using the Normal (Web) style 

Let’s say we have a rich text field whose content fits our needs but does not fit our document’s font style and font size.  Inserting the field into our document as-is will ensure that the field’s content will retain its formatting from Dynamics 365. 

This can be changed by applying a pre-processing rule to the field as demonstrated in this article.  By applying this rule, the content of the rich text field will take from the Normal (Web) style of Word.  Changing the Normal (Web) style’s format will thus change the rich text field’s formatting. 

The Normal (Web) style in Word.  By default, this style uses Times New Roman font
Figure 4: The Normal (Web) style in Word.  By default, this style uses Times New Roman font
Our rich text now matches the style of the Normal (Web) style
Figure 5: Our rich text now matches the style of the Normal (Web) style

Troubleshooting 

Certain characters from rich text fields may not be printed correctly in a generated document.  For example, when wrapping the above text in quotation marks, they may be replaced with question marks. 

Question marks placed where there should be quotation marks
Figure 6: Question marks placed where there should be quotation marks

If this occurs, consider changing the field’s encoding in its field properties.  The default encoding is ASCII, but by changing the encoding to Unicode or UTF-8, the above issue can be fixed. 

Changing our encoding from Unicode to UTF-8
Figure 7: Changing our encoding from Unicode to UTF-8

Example – Formatting by applying a custom style

In another case, let’s say we have a rich text field whose content we would want to include in the document, but we want to give it a particular formatting separate from the rest of the content within our document. 

We can begin by creating a style within Word and applying that style to our field.   

Creating a custom style
Figure 8: Creating a custom style

This alone will not work, however.  The applied style will be lost upon merging the template.  To retain this style, we will need to first modify our field properties.  Our processing rule detailed above should be applied, and we will also need to set our import type to double decoding. 

Applying double decoding and our default processing rule
Figure 9: Applying double decoding and our default processing rule

Then, we will need to enable the Enable HTML Formatting for Fields setting in our Template Settings.  This can be found under the General tab under Miscellaneous. 

Enabling HTML formatting for fields
Figure 10: Enabling HTML formatting for fields

Once these settings have been applied, our rich text field will have the correct style applied. 

Our rich text content with the custom style applied
Figure 11: Our rich text content with the custom style applied

Known Issues

We have received reports that email content may be modified when using the Insert as HTML functionality together with Microsoft’s new Rich Text Editor (RTE) Control. In particular, inserted HTML, especially tables, may not render correctly, resulting in missing borders or altered formatting.

Workaround: Disable the Rich Text Editor Control

  1. In Dynamics, go to Advanced Settings > Customization > Customize the system.
Figure 12: System Customization
  1. Navigate to Entities > Email > Forms and select the form used when writing an email (e.g., Email – Main).
Figure 13: Select form
  1. Click on the Description field and select Change Properties.
Figure 14: Change Properties
  1. Go to the Controls tab and remove the Rich Text Editor Control.
Figure 15: Rich Text Editor Control
  1. Click OK, then Save, and finally Publish your changes.

Once applied, Dynamics will revert to the previous standard control, ensuring that HTML and tables are displayed correctly.

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

Was this helpful?

Yes  2 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
  • Locating Raw Inputs and Outputs in Power Automate
  • Step by Step: How to execute an OCA in a Power Automate flow 
  • The Hidden Cost of CRM Storage — And How to Eliminate It 
  • Recap: Nordic Summit 2025
  • The new Template Designer Office Add-In
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
  • How to insert Condition Fields in DocumentsCorePack Templates designer
  • Important information for Dynamics 365 online customers using DocumentsCorePack and/or AttachmentExtractor
  • How to activate the DocumentsCorePack Connector for PowerApps & Microsoft Flow
  • How licenses are counted
Categories
  • *News and General Infos* 65
  • Webinars 46
  • Template Designer(DCP 197
  • DocumentsCorePack(DCP 262
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 76
  • 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.