返回 Date 类型值,该值代表创建批注的日期和时间。
expression.DateTime
expression 必选。该表达式返回一个 Comment 对象。
请勿将此属性与 DateAndTime 属性相混淆,后者应用于幻灯片的页眉和页脚。
以下示例提供了有关给定幻灯片中所有批注的信息。
Sub ListComments()
Dim cmtExisting As Comment
Dim strAuthorInfo As String
For Each cmtExisting In ActivePresentation.Slides(1).Comments
With cmtExisting
strAuthorInfo = strAuthorInfo & .Author & "'s comment #" & _
.AuthorIndex & " (" & .Text & ") was created on " & _
.DateTime & vbCrLf
End With
Next
If strAuthorInfo <> "" Then
MsgBox strAuthorInfo
Else
MsgBox "There are no comments on this slide."
End If
End Sub