Styles and Themes Affecting Tables and Banners when converting to MHTML

We are experiencing issues relating to the background color of Banners and Tables within converted MHTML when we convert Word documents to MHTML using Aspsose Words.
We have a process which generates Word documents from Word templates that have predefined sections making use of specific styles for fonts and backgrounds for banners and tables. The template specifes that banners and tables use the the following Hexadecimal color scheme. (BFBFBF) (gray)for both banners and table borders.
These templates are distributed to user’s desktops for use when creating reports in Word. Eventually, the Word documents are submitted to an internal service to be converted to MHTML using Aspose Words.
The resulting MHTML sometimes contains vastly different colors in the banners and table borders (e.g. fluorescent green, taupe, etc.) We were able to determine that this appearst to be due to Theme settings within Word which is installed on the user’s desktop. Another odd thing about this situation is the Word document appears to be consistent with the template as does the MHTML output which is created when performing a “Save As MHTML” using Word on the desktop.
Can you provide a means to ensure the colors specified in the original template can be preserved when using Aspose to convert the documents?
I’ve attached a zip file which identifies the areas within the Styles.xml Again these colors settings appear to be related to the settings associacted with the user’s Theme desktop setting.

Thanks for your request. But could you please also attach your input and output documents here for testing? We will check the issue and provide you more information.
In addition, you should note, that there are some restrictions when you convert MS Word document to HTML:
Best regards,

Hi. I am wondering if there are any suggestions you can provide to resolve the issue described in this forum entry?
Please let me know.


Hi Brian,
Thanks for your request. Unfortunately, it is difficult to say what the problem is without the document and code. I need this document and code to be able to reproduce the problem on my side.
It is safe to attach files in the forum. If you attach your document here, only you and Aspose staff members can download it. Also you can send the file to my e-mail as described here:
You can also remove any sensitive information by replacing it with dummy data instead.
Best regards,

Hi Support,

I’m working with Brian on this issue. He has provided the requested info. Is there an update to this issue? Do you need more information on this issue?


OK I have a reproducible scenario.

  1. I right click on desktop->Properties->Appearances->Advances->Select window and change background to yellow.
  2. Open the document provided and it has the yellow background. Now save it. This is what messes up the conversion somehow.
  3. Change the background back to white.
  4. Open the doc again, but do not save to verify that the table shows up with the gray background.
  5. Now use Aspose.word to convert to mhtml.
  6. Open the mhtml file and you will see that the background is white (correct), but the table has a yellow background.

In code to verify the color I do the following

  1. Document doc = new Document(OpenFileName);
  2. examine the Document using quick trace with the following expression:
((((Aspose.Words.Tables.Row)((new System.Linq.SystemCore_EnumerableDebugView((((Aspose.Words.Tables.Table)((new System.Linq.SystemCore_EnumerableDebugView(((Aspose.Words.Body)((Aspose.Words.Story)((((Aspose.Words.Section)((new System.Linq.SystemCore_EnumerableDebugView((doc).Sections)).Items[0]))).Body))).Tables))

You will see that the color is yellow.

So this has nothing to do with the actual MHTML conversion. All I have done is open the doc and look at the object.

Please let me know if there is a workaround for this issue.


Hi Adam,

Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 11.6.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The issue ID is WORDSNET-6840. Your request has also been linked to this issue and you will be notified as soon as it is resolved.

Sorry for the inconvenience.

Best Regards,

Wondering if this issue has been scheduled yet?

Hi Adam,

Thanks for your inquiry. I have verified the status of WORDSNET-6840 from our issue tracking system and regret to share with you that this issues has been postponed till a later date. I am afraid, we cannot push this into production right now because there are many other important issues we have to work on. Rest assured, we will inform you as soon as there are any further developments. Sorry for the inconvenience.

Best Regards,

The issues you have found earlier (filed as WORDSNET-6840) have been fixed in this Aspose.Words for .NET 18.4 update and this Aspose.Words for Java 18.4 update.