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

Free Support Forum - aspose.com

Can I link the font color of a style to a ThemeColor?


I would like to know if it is possible to change the font color of a style to a specific ThemeColor, but also keep the link, so that if a user changes the theme later on the color of the style will be updated automatically?

I’m currently using this code:

var document = new Document();

document.Styles[StyleIdentifier.Normal].Font.Color = document.Theme.Colors.Accent1;

This will create a document where the ‘Normal’ style has the correct color, but when I choose a different (built-in) theme in Word, it doesn’t change color.


Thanks for your inquiry. We will appreciate it if you please share your input document and expected document as ZIP file. You can create your expected document using MS Word to show desired behavior. It will help us to understand and address your requirements exactly.


I’ve created two sample files to illustrate the issue:
TestDocument.zip (17.1 KB)

If you open each document in Word you can see, that the textcolor in both is blue (which matches Accent1). When I go to Design | Colors (on the ribbon) and choose a different color theme the textcolor of the version created by Word is being updated automatically to the new color, which doesn’t happen with the Aspose version.


Thanks for your inquiry. We have tested the scenario and noticed the reported issue. We have logged a ticket WORDSNET-16050 in our issue tracking system for further investigation and rectification. We will keep you updated about the issue resolution progress within this forum thread.

We are sorry for the inconvenience.