• Release History
  • Documentation
  • Back to www.mscrm-addons.com
  • Release History
  • Documentation
  • Back to www.mscrm-addons.com
home/Knowledge Base/Template Designer(DCP)/Using Rich Text fields in DocumentsCorePack Templates

Using Rich Text fields in DocumentsCorePack Templates

3439 views 0 Updated on April 25, 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

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

Was this helpful?

Yes  1 No
Related Articles
  • 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
  • How to add content from SharePoint to a document
  • Using MS Word field codes in DocumentsCorePack templates
Latest Articles
  • DocumentsCorePack: Best practices for Dynamics 365 on-premises to online migration projects
  • Multilingual Support in DocumentsCorePack
  • Recap: ColorCloud 2025
  • Configure DocumentsCorePack within custom pages
  • AI-Powered Document Generation with Copilot in Sales
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 licenses are counted
  • How to insert Condition Fields in DocumentsCorePack Templates designer
Categories
  • *News and General Infos* 62
  • Webinars 44
  • Template Designer(DCP 196
  • DocumentsCorePack(DCP 250
  • TelephoneIntegration (TI 65
  • AttachmentExtractor (AE 72
  • 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
  • © 2022 www.mscrm-addons.com. All Rights Reserved.