Date Property

Microsoft Word Visual Basic

Revision object: The date and time that the tracked change was made. Read-only Date.

Version object: The date and time that the document version was saved. Read-only Date.

Example

This example displays the date and time that the last version of the active document was saved.

Dim docActive As Document

Set docActive = ActiveDocument
If docActive.Path <> "" Then MsgBox _
    docActive.Versions(docActive.Versions.Count).Date
		

This example displays the date and time of the next tracked change found in the active document.

Dim revTemp As Revision

If ActiveDocument.Revisions.Count >= 1 Then
    Set revTemp = Selection.NextRevision
    If Not (revTemp Is Nothing) Then MsgBox revTemp.Date
End If