简体   繁体   English

如何更改MS Word文档中插入的注释的背景颜色?

[英]How to change background color of a comment inserted in MS Word document?

When I enter a comment in a document by clicking Review -> Comments -> New Comment in MS Word 2010, word allows me to enter a comment. 当我通过单击MS Word 2010中的Review -> Comments -> New Comment在文档中输入评论时,单词允许我输入评论。 However, I am not able to change the background color of the comment box. 但是,我无法更改注释框的背景颜色。

Is there a way by which background color of the comment box can be changed in MS Word? 有没有办法在MS Word中更改评论框的背景颜色?

I am asking this because, I am writing a VBA code to read all the comments inserted in a document. 我之所以这样问是因为,我正在编写一个VBA代码以读取文档中插入的所有注释。 I also want to get information about the background color of the comment box. 我还想获得有关评论框背景颜色的信息。 So, if it can be done using tools provided in the ribbon, it can be done through VBA as well. 因此,如果可以使用功能区中提供的工具完成此操作,那么也可以通过VBA完成。 With this notion in mind, I am asking this. 记住这个想法,我问这个。

I noticed that in Word, comments background color can't be decided by you, but they can be changed randomly (at least to me) by changing the username of the current user. 我注意到在Word中,评论背景颜色不能由您决定,但可以通过更改当前用户的用户名随机更改(至少对我来说)。

For example, I originally had all my comments in pink boxes. 例如,我本来所有的评论都放在粉红色的盒子里。 Until I executed this 直到我执行此操作

Application.UserName = "Ahmad MUTAWA"

After that, each comment I added is in a violet box. 之后,我添加的每个评论都在一个紫色框中。 I did another change, 我做了另一个改变,

Application.UserName = "Ahmad"

and yet my new comments were added into a another shade of pink. 但是我的新评论又加入了另一种粉红色。 Look at the attached screenshot. 查看随附的屏幕截图。 These comments appear in three different colors, but they all were added by me under different usernames. 这些评论以三种不同的颜色显示,但是它们都是由我以不同的用户名添加的。 评论颜色

So what you can do is look for comments written by different Reviewer s since each reveiwer is essentially a username. 因此,您可以做的是查找由不同Reviewer撰写的注释,因为每个接收者实质上都是一个用户名。

As Ahmad indicated, you can change the color of a comment by having the comment have a different author. 正如艾哈迈德所说,你可以通过让评论有不同的作者来改变评论的颜色。

You can access all of the comments via ActiveDocument.Comments. 您可以通过ActiveDocument.Comments访问所有注释。

Something like the following: 类似于以下内容:

dim c as Comment
For each c in ActiveDocument.Comments
    'Give each comment a unique author.
    c.Author = "Author" & c.Index
next

Would change the author of every comment, and each comment would have a different color. 将更改每个评论的作者,并且每个评论将具有不同的颜色。

That being said, you should be able to read all comments and figure out if the colors are the same by tracking the author of the comment. 话虽这么说,您应该能够阅读所有评论,并通过跟踪评论的作者来确定颜色是否相同。 However, there does not appear to be any practical way to update the color of the comment via code or even know the actual comment color. 但是,似乎没有任何实用的方法可以通过代码更新注释的颜色,甚至不知道实际的注释颜色。

转到“评论” Review-> Track Changes选项”,它将使您(作者)有机会更改评论的颜色,因此您可以将其更改为与红色和蓝色不同的颜色

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM