Word) (注释对象

一个 Comment 对象的集合,这些对象代表所选内容、区域或文档中的批注。

备注

Comments 属性可返回一个 Comments 集合。 以下示例显示 Don Funk 在活动文档中所做的备注。

ActiveDocument.ActiveWindow.View.SplitSpecial = wdPaneComments 
ActiveDocument.Comments.ShowBy = "Don Funk"

使用 添加 在指定范围内添加注释的方法。 下列示例紧接着选定内容添加注释。

Selection.Collapse Direction:=wdCollapseEnd 
ActiveDocument.Comments.Add Range:=Selection.Range, _ 
 Text:="review this"

使用 注释 (索引),其中索引是索引号,返回单个 批注 对象。 索引号代表指定的选定内容、 范围或文档中注释的位置。 以下示例显示活动文档中第一个备注的作者。

MsgBox ActiveDocument.Comments(1).Author

以下示例显示选定内容中第一个备注的作者的缩写。

If Selection.Comments.Count >= 1 Then MsgBox _ 
 Selection.Comments(1).Initial

方法

名称
Add

属性

名称
Application
Count
Creator
Parent
ShowBy

另请参阅

Word 对象模型参考

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。