返回一个 字符串 ,表示与指定的 批注 对象的作者。 此为只读属性。
语法
expression。 Author
表达 一个代表 Comment 对象的变量。
返回值
String
备注
该属性只返回作者的姓名。 若要返回作者姓和名的首字母,请使用 AuthorInitials 属性。 在向演示文稿中添加新批注时,请指定批注的作者。
示例
以下示例向活动演示文稿的第一张幻灯片中添加批注,然后以消息的形式显示作者的姓名以及姓和名的首字母。
Sub GetAuthorName()
With ActivePresentation.Slides(1)
.Comments.Add Left:=100, Top:=100, Author:="Jeff Smith", _
AuthorInitials:="JS", _
Text:="This is a new comment added to the first slide."
MsgBox "This comment was created by " & _
.Comments(1).Author & " (" & .Comments(1).AuthorInitials & ")."
End With
End Sub
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。