返回创建批注时的日期和时间。
语法
expression。 DateTime
表达 一个代表 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
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。