Comment 属性

       

返回文档指定版本的批注。String 类型,只读。

示例

本示例显示活动文档第一个版本的批注文字。

If ActiveDocument.Versions.Count >= 1 Then
    MsgBox Prompt:=ActiveDocument.Versions(1).Comment, _
        Title:="First Version Comment"
End If

本示例保存文档的某一版本及用户的批注,然后显示该批注。

Dim verTemp As Versions
Dim strComment As String
Dim lngCount As Long

Set verTemp = ActiveDocument.Versions

strComment = InputBox("Type a comment")
verTemp.Save Comment:=strComment
lngCount = verTemp.Count
MsgBox Prompt:=verTemp(lngCount).Comment, _
    Title:=verTemp(lngCount).SavedBy