CommentsPart

Overview

CommentsPart is a class in Aspose.Slides FOSS for .NET.

Manages a slide comments XML part ( ppt/comments/slideN.xml ). One file exists per slide that has comments.

This class provides 16 methods for working with CommentsPart objects in .NET programs. Available methods include: AddComment, Clear, ComputeRelativeTarget, Count, FindCommentByIdx, FindCommentByIdxAll, GetComments, GetCommentsByAuthor, InsertComment, IsEmpty, Load, RemoveComment, and 4 additional methods. All exported members are accessible to any .NET application after installing the Aspose.Slides FOSS for .NET package. Properties: PartName.

Description

CommentsPart is a class in the Aspose.Slides FOSS library for .NET that exposes 16 methods and 1 property for programmatic use.

The class also provides the PartName property (gets the part name).

Properties

NameTypeAccessDescription
PartNamestringReadGets the part name.

Methods

SignatureDescription
Load()Loads the comments XML from the package.
GetComments()Returns all comments in this part.
GetCommentsByAuthor(authorId: int)Returns comments belonging to the specified author.
FindCommentByIdxAll(idx: int)Finds a comment by its index across all authors.
FindCommentByIdx(authorId: int, idx: int)Finds a comment by author ID and index.
AddComment(authorId: int, idx: int, text: string, posX: float, posY: float, dtStr: string, parentIdx: int?)Appends a new comment element and returns its data.
InsertComment(index: int, authorId: int, idx: int, text: string, posX: float, posY: float, dtStr: string, parentIdx: int?)Inserts a comment at the given index among existing comments.
RemoveComment(authorId: int, idx: int)Removes a comment by author ID and index.
RemoveCommentElem(elem: XElement)Removes the specified XML element from the comments list.
RemoveCommentsAt(index: int)Removes the comment at the specified position.
Clear()Removes all comment elements.
Count()Returns the number of comments.
IsEmpty()Returns true if there are no comments.
Save()Saves the comments XML back to the package.
ResolveTarget(fromPart: string, target: string)Resolves a relative target path to an absolute part name.
ComputeRelativeTarget(fromPart: string, toPart: string)Computes a relative path from one part to another.

See Also