In "code-behind" I use the InsertField method to insert a MergeField into the document.. The problem is when i open the document in msWord the FontType is wrong and when i open the document after save in RichEdit the fields isn't visible.. Is there a way to fix this?
4 Answers, 1 is accepted
The problem with the Font is probably a bug, the font formating is fine if I save the document as a rtf file instead of docx..
Have also countered some other bugs when I use mailmerge and the docx format
Thank you for getting to us about the export of merge fields.
The format providers export the result of the merge fields and when a merge source has not been set, the fields are not visible in the exported document. We have planned to add customization settings to the provider, so that merge fields can be exported using their display name/display code.
The workaround you have found should work correctly.
If you have encountered other bugs, we would appreciate it if you could share them with us.
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
InsertMergeFieldEmptyCommand is infrastucture command used for binding the RadRichTextBoxRibbonUI. If you want a command that inserts a merge field, you can use InsertFieldCommand, which accepts as parameter a Field and inserts it at the current caret position:
You can read more about mail merge in this help article.
Don't hesitate to contact us if you have other questions.Kind regards,
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>