I have a Word template that has an embedded TrueType font. After performing a merge, the document looks great except that the merged data isn’t in the same font… I’ve attached the template and output for your review.
Are you using latest version of Aspose.Words? I think this issue was resolved some time ago. We certainly have tests exactly for this scenario.
It should work with an embedded TrueType font as long as the whole font is embedded (not a subset of used characters only). In your case it should be alright anyway, at least in the example as most of the characters inserted during mail merge seem to be already used by the surrounding text.
I didn’t manage to get a project together but I wanted to let you know that this font issue is still happening for me. Would a project help? It sounds like you probably already have one for testing this.
Let me know if I should provide more information on this.
Hi Mike,
I figured out the reason of this problem. The First Run after FieldSeparator has Times New Roman font that’s why inserted value has Times New Roman font too. There is strange issue in MSWord – you can’t set Magik font for whole mergefield. I found two workarounds of this problem.
First solution. Set Magik font for all Runs in document. See the code.
Thank you for this, Alexey. Unfortunately in my case I can’t really use this because my end-users use dozens of different templates with an endless variety of fonts that I can never predict ahead of time. So for a completely dynamic solution, I’ll have to continue to ponder this.
Hi
I have created new issue #4384 in our defect database. Please expect a reply before the next hotfix (within 2-3 weeks). We might just fix it by then or provide more information.
Best regards.