Class Comments (PowerPoint VBA)

The class Comments represents a collection of Comment objects. To use a Comments class variable it first needs to be instantiated, for example

Add2

Replaces hidden Add method. Returns a Comment object that represents a new comment added to a slide. For more infomation about modern comments, see Modern comments in PowerPoint.

Add2 (Left, Top, Author, AuthorInitials, Text, ProviderID, UserID)


Dim strAuthor As String: strAuthor = 
Dim strAuthorInitials As String: strAuthorInitials = 
Dim strText As String: strText = 
Dim strProviderID As String: strProviderID = 
Dim strUserID As String: strUserID = 
Dim cmms As Comments: Set cmms = 
Dim cmmAdd2 As Comment
Set cmmAdd2 = cmms.Add2(Left:=, Top:=, Author:=strAuthor, AuthorInitials:=strAuthorInitials, Text:=strText, ProviderID:=strProviderID, UserID:=strUserID)

Arguments

The following arguments are required:

Left (Single) - The position, measured in points, of the left edge of the comment, relative to the left edge of the presentation.

Top (Single) - The position, measured in points, of the top edge of the comment, relative to the top edge of the presentation.

Author (String) - The author of the comment.

AuthorInitials (String) - The author's initials.

Text (String) - The comment's text.

ProviderID (String) - The service that provides contact information.Example: "AD" (Active Directory).

UserID (String) - The ID of the user providing the comment.

Count

Returns the number of objects in the specified collection.


Dim cmms As Comments: Set cmms = 
Dim lngCount As Long
lngCount = cmms.Count

Item

Returns a single Comment object from the specified Comments collection.

Item (Index)

Index: The index number of the single Comment object in the collection to be returned.


Dim cmms As Comments: Set cmms = 
Dim cmm As Comment
Set cmm = cmms(Index:=1)