Slide comment is like an annotation in PDF file or a note that one can attach with a slide. Slide comments are generally used while reviewing the slides in PowerPoint. However, they can also serve as a useful utility for highlighting something important in presentation slide and giving the needed explanation for that.
Add Slide Comment
In Aspose.Slides for C++, the presentation slide comment are associated with a particular author. The Presentation class holds the collection of authors in ICommentAuthorCollection that are responsible for adding slide comments. For each author, there is a collection of comments in ICommentCollection. The IComment class includes information like an author who added slide comment, time of creation, slide where a comment is added, the position of slide comment on the selected slide and the comment text. The CommentAuthor class includes the author’s name, his initials and list of associated comments. In the following example, we have added the code snippet for adding the slide comments.
Access Slide Comment
In the following example, we will learn how to access the existing slide comments and can even modify the comments as well.
Add Comment Reply
New get_ParentComment() and set_ParentComment() methods have been added to IComment and Comment classes. These methods allow to get or set the parent comment, thus creating a dialog in the form of a hierarchy of comments and replies.
The code snippet below shows a sample of adding some comments and some replies to them:
Attention: Remove method of IComment interface removes the comment with all its replies.
NOTE: If setting ParentComment leads to a circular reference, the exception of type PptxEditException will be thrown.