Comment.DateTime プロパティ (PowerPoint)

コメントが作成された日付と時刻を取得します。

構文

expression. DateTime

expression は Comment オブジェクトを表す変数です。

戻り値

Date

注釈

DateTime プロパティは、スライドのヘッダーとフッターに適用される 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

関連項目

Comment オブジェクト

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。