让Windows 10为MS Office注释设置默认背景颜色 [英] Getting Windows 10 to set default background color for MS Office Comments

查看:96
本文介绍了让Windows 10为MS Office注释设置默认背景颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我使用Windows 7时,我没有任何问题,因为这可以通过主题和外观来设置。但是,当升级到Windows 10时,我无法在默认情况下完成此操作,即使通过InfoWindow注册表设置控制面板
级别和桌面级别设置为255 255 0。

When I was using Windows 7, I had no issue as this could be set via the themes and appearances. However, when upgrading to Windows 10, I have not been able to get this done by default, even via the InfoWindow registry settings for both the control panel level and the desktop level set at 255 255 0.

对于我工作的其中一个工作簿,我已经输入了代码行:

For one of the workbooks I work in, I have already put in the code line of:

ActiveCell.Comment.Shape.DrawingObject.Interior.Color = 65535

ActiveCell.Comment.Shape.DrawingObject.Interior.Color = 65535

所以我不需要手动设置这么多。 另一方面,我已经试图取代Excel的F2键盘快捷键,在Excel中的活动单元格中插入注释,并使用我自己的一个,将背景颜色
设置为我想要的设置因为我几乎不是每次都要手动做,如果不是每次都这样做。

So as I don't have to do the setting manually nearly so much.  On the other hand, I am already half-tempted at replacing Excel's F2 keyboard shortcut of inserting a comment at the active cell within Excel with one of my own to have the background color set to what I want to have it set to, so as I don't have to do it manually nearly every time, if not every time.

推荐答案

你好
RRDodge,

从线程的描述看起来你想要为背景颜色等所有注释设置相同的格式。

From the description of the thread it looks like you want set the same formatting for all the comments like background color.

你提到的其他事情你要改变添加的快捷方式评论为"F2"。

other thing you had mentioned that you want to change the shortcut of adding comments to "F2".

因此您可以使用下面提到的代码来设置评论的特定格式。

so you can use the code mentioned below to set the particular format of comments.

Sub demo()
 Dim MyComments As Comment
 Dim LArea As Long
 For Each MyComments In ActiveSheet.Comments
 With MyComments
 .Shape.AutoShapeType = msoShapeRoundedRectangle
 .Shape.TextFrame.Characters.Font.Name = "Tahoma"
 .Shape.TextFrame.Characters.Font.Size = 8
 .Shape.TextFrame.Characters.Font.ColorIndex = 2
 .Shape.Line.ForeColor.RGB = RGB(0, 0, 0)
 .Shape.Line.BackColor.RGB = RGB(255, 255, 255)
 .Shape.Fill.Visible = msoTrue
 .Shape.Fill.ForeColor.RGB = RGB(58, 82, 184)
 .Shape.Fill.OneColorGradient msoGradientDiagonalUp, 1, 0.23
 End With
 Next
 End Sub

首先你需要添加所有注释然后在最后运行上面提到的宏来设置格式。

first you need to add all the comments then at the end run the above mentioned macro to set the format.

如果我们谈论快捷方式你可以按" ; Shift键+ F2键"插入评论。

if we talk about shortcut the you can press "Shift key + F2 key" to insert comment.

如果您对此问题有任何进一步的询问,请告诉我。

let me know if you have any further query about this issue.

您还可以尝试从宏添加评论您想要的格式,然后为该宏指定一个快捷键。因此,当您按下该快捷键时,将添加评论。

you can also try to add comments from the macro with your desired formatting and then assign a short cut key to that macro. so that when you press that shortcut key then comment will be added.

示例代码:

Sub CommentTheCell()
Application.DisplayAlerts = False
ActiveCell.ClearNotes
ActiveCell.NoteText Text:=InputBox("Enter comment")
ActiveCell.NoteText
ActiveCell.Comment.Shape.Fill.OneColorGradient msoGradientDiagonalUp, 1, 0.23
End Sub


 

您也可以填充纯色而不是渐变。

 

you can also fill solid color instead of gradient.

访问下面提到的链接以指定宏的快捷方式。

visit the link mentioned below to assign shortcut to macro.

在Excel
中为VBA宏指定快捷键

注意: - 它不允许你输入"F2"键作为捷径。您必须使用ctrl键的组合选择密钥。 问候

Note:- it will not allow you to enter "F2" key as a shortcut. you have to select the key with the combination of ctrl key.Regards

Deepak


这篇关于让Windows 10为MS Office注释设置默认背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆