This is based on the most recent build we have (downloaded this morning, RadControls_for_WPF_2011_3_1116_Dev_hotfix)
When we import a file in docx format, and do a MailMerge() call, the fields merging appears to work perfectly, except that the style (or ‘format’ in MS Word parlance) is not maintained. Whether it’s bold, underlined, different font, different colour, it doesn’t matter, the text that is merged into that field always goes in with what appears to be the default RadDocument/RichTextDocument format (Verdana, 12 pt).
I’ve not been able to find any properties or anything that seem to indicate that merged values will override the styles/formats of the merge fields they’re replacing. It doesn’t appear as if it’s respecting the “Preserve formatting during updates” setting from MS Word
This is the code being used:
private RadDocument MergeDataFieldsWithDocument(RadDocument radDocument)
{
var mergeFieldsAndValues = DeriveValuesToMergeWithDocumentFields();
radDocument.MailMergeDataSource.ItemsSource = mergeFieldsAndValues;
return radDocument.MailMerge(false);
}
private static List<object> DeriveValuesToMergeWithDocumentFields()
{
return new List<object>
{
new
{
DATE_TODAY = "test"
}
};
}
How can we make it so that the merge fields use the correct format?
Thanks,
Brock