PowerPoint) (注释对象

表示 注释 的对象的集合。

示例

使用注释属性来引用的 注释 集合。 下面的示例显示当前幻灯片上的注释的数目。

Sub CountComments()
    MsgBox "You have " & ActiveWindow.Selection.SlideRange(1) _
        .Comments.Count & " comments on this slide."
End Sub

使用Add方法可向幻灯片中添加批注。 本示例向当前演示文稿第一张幻灯片添加新注释。

Sub AddComment()

    Dim sldNew As Slide
    Dim cmtNew As Comment

    Set sldNew = ActivePresentation.Slides.Add(Index:=1, _
        Layout:=ppLayoutBlank)

    Set cmtNew = sldNew.Comments.Add(Left:=12, Top:=12, _
        Author:="Jeff Smith", AuthorInitials:="JS", _
        Text:="You might consider reviewing the new specs" & _
        "for more up-to-date information.")

End Sub

另请参阅

PowerPoint 对象模型引用

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。