Thursday, March 23, 2006 1:21 AM
I'm trying to change the backgroud color of the comments I add to a word document. I can do it using Options.CommentsColor but this function modifies the color of all of the comments in the document.
Is there any solution to modify the color of the comments in an independent way? Can I have various comments in a different color in the same document without change the author?
Monday, March 27, 2006 2:53 AM
You can programmatically set the color when you add the comment:
Me.Comments.Add(Me.Range, "Here's my comment").Range.Font.Color = _
Or you can loop through all comments in the document, and set the color. In the example below, I check the index of the comment and set the color accordingly.For Each comment As Word.Comment In Me.Comments
Select Case comment.Index
Case 1, 4, 7
comment.Range.Font.Color = Word.WdColor.wdColorBlue
Case 2, 5, 8
comment.Range.Font.Color = Word.WdColor.wdColorYellow
Case 3, 6, 9
comment.Range.Font.Color = Word.WdColor.wdColorDarkRed
Friday, March 31, 2006 10:19 AM
This only works for the foreground (text) color. Is there a way to get it to work with the background color? E.g. a specific comment has red text on a blue background.
Wednesday, April 05, 2006 12:18 AM
I don't know of a way to change the background color of the comment without changing the "reviewer". What you could do instead is set the HighlightColorIndex property, as the following code example shows:
Me.Comments.Add(Me.Range, "Here's my comment").Range.HighlightColorIndex = _
Wednesday, April 19, 2006 4:26 PMthanks for your help,
I already use the highlight option but the problem is that the comment is in the foreground so the highlight is invisible when a comment is added to same text section...