MS Word's comment highlight color change

Hi team,
Is there a way to change the highlight color from default gray to yellow.

AsposeWord.Comment comment = new AsposeWord.Comment(e.MatchNode.Document, "Mr. Jaibir", "JBR", DateTime.Today);
comment.Paragraphs.Add(new AsposeWord.Paragraph(e.MatchNode.Document));
comment.FirstParagraph.Runs.Add(new AsposeWord.Run(e.MatchNode.Document, comments));
AsposeWord.CommentRangeStart commentRangeStart = new AsposeWord.CommentRangeStart(e.MatchNode.Document, comment.Id);
AsposeWord.CommentRangeEnd commentRangeEnd = new AsposeWord.CommentRangeEnd(e.MatchNode.Document, comment.Id);
AsposeWord.Run runStart = (AsposeWord.Run)runs[0];
AsposeWord.Run runEnd = (AsposeWord.Run)runs[runs.Count - 1];
runStart.ParentNode.InsertBefore(commentRangeStart, runStart);
runEnd.ParentNode.InsertAfter(commentRangeEnd, runEnd);
commentRangeEnd.ParentNode.InsertAfter(comment, commentRangeEnd);

Thanks & Best Regards
Jaibir Singh

@Jaibir Comments highlight color is not stored in the document. It is defined on application level:

Since Aspose.Words does not interact with MS Word there is no way to change it using Aspose.Words.

1 Like