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

Free Support Forum - aspose.com

Word styles and HTML classes

I have a problem, and I would like to discuss it with you before trying a dirty solution.
Is there a way to transform html classes into word styles ?
Let me explain…
I have an html, with different classes. These classes are important to identify semantic blocks. The author, I’m working with are familiar with Word and the choice has been made to let them modify the html using Word.
Here is the flow :
We have HTML => The document is transformed into Word so that the author can modify it => The word document is translated back to HTML.

During this transformation, we have to transform the HTML classes into CSS. (and Aspose does it pretty well) but we lose the “style” name… Is there a way to keep it ?

For exemple…

My special remark

(the style .special-remark => color: red) transforms into something red in Word. We use a word template, and we inject the html inside. In the template, we have a Style called "Special Remark", which inheris from "Normal" and just adds a red color. When I inject the html into the template, the paragraph is transformed into something red (because of the css rule), but when I click on the red paragraph, it's not identified as a "Special Remark" Style in the word.

Is there a way to tell Aspose, that my “special-remark” html class is linked to my “Special Remark” style in Word?

Thanks for your help,


To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input HTML document.
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file that shows the desired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.