Nóta
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as shíniú isteach nó eolairí a athrú.
Teastaíonn údarú chun rochtain a fháil ar an leathanach seo. Is féidir leat triail a bhaint as eolairí a athrú.
Represents a collection of Comment objects.
Example
Use the Commentsproperty to refer to the Comments collection. The following example displays the number of comments on the current slide.
Sub CountComments()
MsgBox "You have " & ActiveWindow.Selection.SlideRange(1) _
.Comments.Count & " comments on this slide."
End Sub
Use the Addmethod to add a comment to a slide. This example adds a new comment to the first slide of the active presentation.
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
See also
PowerPoint Object Model Reference
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.