Table of contents
TOC
Collapse the table of content
Expand the table of content

Comment.DateTime Property (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Returns the date and time a comment was created.

Syntax

expression. DateTime

expression A variable that represents a Comment object.

Return Value

Date

Remarks

Don't confuse this property with the DateAndTime property, which applies to the headers and footers of a slide.

Example

The following example provides information about all the comments for a given slide.

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

See also

Concepts

Comment Object

© 2017 Microsoft