g批注

  1. g批注

g批注

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Sub 添加批注(control As IRibbonControl) '批注-添加批注
'添加批注
Application.ScreenUpdating = False '关闭屏幕更新
Selection.Collapse Direction:=wdCollapseEnd
ActiveDocument.Comments.Add _
Range:=Selection.Range, Text:=""
Application.ScreenUpdating = True '恢复屏幕更新
End Sub
Sub 删除批注(control As IRibbonControl) '批注-删除批注
'删除批注
On Error GoTo err_msgbox
Selection.Comments(1).Delete
Exit Sub
err_msgbox:
MsgBox ("你需要先选中一个批注")
End Sub
Sub 修订上色(control As IRibbonControl)
Dim oDoc As Document
Set oDoc = Word.ActiveDocument
Dim oRevision As Revision
For Each oRevision In oDoc.Revisions
With oRevision
t = .Range.Text
.Range.HighlightColorIndex = wdYellow
End With
Next
End Sub

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 richffan@outlook.com

文章标题:g批注

字数:140

本文作者:Rich Fan

发布时间:2023-05-15, 00:00:00

最后更新:2024-02-27, 08:17:39

原始链接:http://fanrich.github.io/2023/05/14/VBA/%E5%BA%95%E7%A8%BF%E5%B0%8F%E5%B8%AE%E6%89%8B%E4%BB%A3%E7%A0%81/g%E6%89%B9%E6%B3%A8/

版权声明: "署名-非商用-相同方式共享 4.0" 转载请保留原文链接及作者。