代表 Comment 物件的集合。
範例
若要參照 Comments 集合使用的註解屬性。 下列範例會顯示目前的投影片上的註解數目。
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
另請參閱
支援和意見反應
有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱 Office VBA 支援與意見反應。