會傳回建立註解的日期和時間。
語法
expression。 DateTime
詞 一個代表 Comment 物件的變數。
傳回值
Date
註解
請勿將這項屬性與 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 支援與意見反應。