We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Insert HTML into document while performing mail merge generates incorrect output using .NET

Hello, I've been workng with Aspose for a while now and recently wanted to upgrade to 10.4. I'm currently on 9.4. However, I discovered a large impact area which is preventing me from upgrading.

Currently we have mergefields on template documents and these already have a lot of the mark-up we need them to have like alignement(left, center or right), bold, underline and so forth. Currenlty, when we feed any HTML to the word document we have to go through Aspose's InsertHtml method and everything works fine when we use the

 tag.  On the new version however, all alignment gets removed and everything gets left alinged if the 
 tag is used. Why does this happen?

Also, I tried removing the pre tag and just replacing " " with "&nbsp", but this adds a weird character that LOOKS like a space in word, but actually is seen as a letter, so it won't wrap properly in the document. Any other suggestions to get this fixed? The reason we go through the insert HTML method is because we are passing additional markup in case we do need some stuff bolded and other not. However, the spacing should remain as well as the line breaks.

Hi Daniel,

Thanks for your query. Please use the latest version of Aspose.Words for .NET. If you still face problem, Please share your document along with code for investigation purposes.

Upgrading to the newest version is not an option right now. Could you please explain what is happening and ways we can work around the problem.

Hi Daniel,

Please accept my apology for late response. It would be great, If you share your document along with code for investigation purposes.

Thanks.