Share via


Comment.AuthorIndex Property

Returns a Long representing the index number of a comment for a given author. The first comment for a given author has an index number of 1, their second comment has an index number of 2. Read-only.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
ReadOnly Property AuthorIndex As Integer
    Get
'Usage
Dim instance As Comment
Dim value As Integer

value = instance.AuthorIndex
int AuthorIndex { get; }

Property Value

Type: System.Int32
Long

Examples

The following example provide information about the authors and their comment indexes for a given slide.

Sub GetCommentAuthorInfo()



    Dim cmtComment As Comment

    Dim strAuthorInfo As String



    With ActivePresentation.Slides(1)

        If .Comments.Count > 0 Then

            For Each cmtComment In .Comments

                strAuthorInfo = strAuthorInfo & "Comment Number:  " & _

                    cmtComment.AuthorIndex& vbLf & _

                    "Made by:  " & cmtComment.Author & vbLf & _

                    "Says:  " & cmtComment.Text & vbLf & vbLf

            Next cmtComment

        End If

    End With



    MsgBox "The comments for this slide are as follows: " & _

        vbLf & vbLf & strAuthorInfo



End Sub

See Also

Reference

Comment Interface

Comment Members

Microsoft.Office.Interop.PowerPoint Namespace