title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
Version.Comment property (Word) |
vbawd10.chm162792428 |
|
|
52ca9077-0295-3059-b699-6fa97ad45991 |
06/08/2017 |
medium |
Returns the comment associated with the specified version of a document. Read-only String.
expression.Comment
expression A variable that represents a 'Version' object.
This example displays the comment text for the first version of the active document.
If ActiveDocument.Versions.Count >= 1 Then
MsgBox Prompt:=ActiveDocument.Versions(1).Comment, _
Title:="First Version Comment"
End If
This example saves a version of the document with the user's comment and then displays the comment.
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
[!includeSupport and feedback]