共用方式為


Comment.AuthorIndex 屬性 (PowerPoint)

會傳回 Long 代表特定作者的註解索引編號。 特定作者的第一個註解 1 的索引編號,其第二個註解 2 的索引編號。 唯讀。

重要事項

此特性不適用於現代註解。

語法

expressionAuthorIndex

一個代表 Comment 物件的變數。

傳回值

Long

範例

下列範例會提供指定投影片之作者及其註解索引的相關資訊。

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

另請參閱

Comment 物件

支援和意見反應

有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應