Skip to content

Commit 62f70f6

Browse files
committed
new KB
1 parent 259fc87 commit 62f70f6

File tree

4 files changed

+14
-16
lines changed

4 files changed

+14
-16
lines changed
60.3 KB
Loading

knowledge-base/simulating-mail-merge-with-html-content.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ type: how-to
55
page_title: Simulating Mail Merge with HTML content by Utilizing the Find and Replace Functionality
66
meta_title: Simulating Mail Merge with HTML content by Utilizing the Find and Replace Functionality
77
slug: simulating-mail-merge-with-html-content
8-
tags: wordsprocessing,telerik document processing,mail merge,html content,html format provider
8+
tags: words, processing,telerik, document, mail, merge, html, content, find, replace
99
res_type: kb
1010
ticketid: 1694621
1111
---
@@ -18,19 +18,16 @@ ticketid: 1694621
1818

1919
## Description
2020

21-
I want to perform mail merge using Telerik Document Processing Library, where HTML content needs to replace placeholders in a DOCX template. When performing mail merge, the library binds plain HTML text instead of rendering the HTML with formatting. In some cases, using the HtmlFormatProvider results in corrupted documents.
21+
This article demonstrates a sample approach how to simulate [mail merge]({%slug radwordsprocessing-editing-mail-merge%}), where HTML content needs to replace placeholders in a DOCX template. When performing mail merge, the WordProcessing library binds plain HTML text instead of rendering the HTML with formatting.
2222

23-
This knowledge base article also answers the following questions:
24-
- How to insert formatted HTML content in mail merge using Telerik Document Processing?
25-
- How to replace placeholders with styled HTML content in RadFlowDocument?
26-
- How to use HtmlFormatProvider correctly in Telerik WordsProcessing?
23+
![Replace Placeholders with HTML content in DOCX template ><](images/simulating-mail-merge-with-html-content.png)
2724

2825
## Solution
2926

30-
To render HTML content during mail merge, use the find-and-replace functionality instead of the default mail merge engine. Replace placeholders with styled HTML content using the following steps:
27+
To render HTML content during mail merge, use the [Find-and-Replace]({%slug radwordsprocessing-editing-find-and-replace%}) functionality instead of the default mail merge engine. Replace placeholders with styled HTML content using the following steps:
3128

32-
1. Import the HTML content using HtmlFormatProvider.
33-
2. Import the DOCX template using DocxFormatProvider.
29+
1. Import the HTML content using [HtmlFormatProvider]({%slug radwordsprocessing-formats-and-conversion-html-htmlformatprovider%}).
30+
2. Import the DOCX template using [DocxFormatProvider]({%slug radwordsprocessing-formats-and-conversion-docx-docxformatprovider%}).
3431
3. Find placeholders in the template and replace them with the imported HTML content.
3532

3633
### Code Example
@@ -80,11 +77,11 @@ Process.Start(new ProcessStartInfo() { FileName = outputFilePath, UseShellExecut
8077
### Notes:
8178
- Replace `<<EXSUSection>>` with your placeholder text.
8279
- Modify the code to suit your template and requirements.
83-
- Ensure the provided HTML content is supported by HtmlFormatProvider.
80+
- Ensure the provided HTML content is [supported]({%slug radwordsprocessing-formats-and-conversion-html-supported-elements%}) by HtmlFormatProvider.
8481

8582
## See Also
8683

87-
- [HtmlFormatProvider Documentation](https://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/formats-and-conversion/html/htmlformatprovider)
88-
- [DocxFormatProvider Documentation](https://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/formats-and-conversion/word-file-formats/docx/docxformatprovider)
89-
- [Mail Merge Documentation](https://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/editing/mail-merge)
90-
- [Replace Text with Document Elements](https://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/editing/find-and-replace/replace-document-elements)
84+
- [HtmlFormatProvider]({%slug radwordsprocessing-formats-and-conversion-html-htmlformatprovider%})
85+
- [DocxFormatProvider]({%slug radwordsprocessing-formats-and-conversion-docx-docxformatprovider%})
86+
- [Mail Merge Documentation]({%slug radwordsprocessing-editing-mail-merge%})
87+
- [Find-and-Replace]({%slug radwordsprocessing-editing-find-and-replace%})

libraries/radwordsprocessing/editing/find-and-replace/find-and-replace-text.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ __RadFlowDocumentEditor__ gives you the ability to format all occurrences of a s
9999
* [RadFlowDocumentEditor]({%slug radwordsprocessing-editing-radflowdocumenteditor%})
100100
* [CharacterProperties]({%slug radwordsprocessing-concepts-style-properties%})
101101
* [RadFlowDocument]({%slug radwordsprocessing-model-radflowdocument%})
102-
* [RadFlowDocumentEditor API Reference](https://docs.telerik.com/devtools/document-processing/api/Telerik.Windows.Documents.Flow.Model.Editing.RadFlowDocumentEditor.html)
102+
* [Simulating Mail Merge with HTML content by Utilizing the Find and Replace Functionality]({%slug simulating-mail-merge-with-html-content%})

libraries/radwordsprocessing/editing/mail-merge.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,5 @@ If you want to separate the items into several rows you need to close the group
227227
* [Populate a Table with Data using Nested Mail Merge Functionality]({%slug populate-table-data-mail-merge%})
228228
* [Generating a Word Document Template with Data Using MailMerge in RadWordsProcessing]({%slug generate-doc-template-and-populate-with-collection-data-mail-merge%})
229229
* [How to Remove a MERGEFIELD While Replacing the Placeholders with Values in RadWordsProcessing]({%slug remove-mergefields-retain-values-radwordsprocessing%})
230-
* [Performing Nested MailMerge with Multiple Levels in RadWordsProcessing]({%slug nested-mailmerge-radwordsprocessing%})
230+
* [Performing Nested MailMerge with Multiple Levels in RadWordsProcessing]({%slug nested-mailmerge-radwordsprocessing%})
231+
* [Simulating Mail Merge with HTML content by Utilizing the Find and Replace Functionality]({%slug simulating-mail-merge-with-html-content%})

0 commit comments

Comments
 (0)