Setting font color for everything in the document

We’re trying to set the font color for everything in the document and using the visitor pattern to hit every node in the document, but there’s one thing in the document that doesn’t get touched. It appears to be an auto-numbered list. Is this a bug, or am I missing a field to visit?? (see attached code for an example)

Hi Linda,

Thanks for your inquiry. I suggest you please upgrade to the latest version of Aspose.Words for Java 14.6.0 from here:
https://releases.aspose.com/words/java

Please use the following code example to set the color of list label.

Document doc = new Document(MyDir + "LFAOPTClause.docx");
for (List list : doc.getLists())
{
    list.getListLevels().get(0).getFont().setColor(Color.BLACK);
}
FontChanger changer = new FontChanger();
doc.accept(changer);
doc.save(MyDir + "OutJ.docx");

That works. Thanks for the response.

Hi Linda,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.