ApiCommentReply

new ApiCommentReply()

Class representing a comment reply.

Methods

Name Description
GetAuthorName

Returns the comment reply author's name.

GetClassType

Returns a type of the ApiCommentReply class.

GetText

Returns the comment reply text.

GetUserId

Returns the user ID of the comment reply author.

SetAuthorName

Sets the comment reply author's name.

SetText

Sets the comment reply text.

SetUserId

Sets the user ID to the comment reply author.

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is just a sample text");
Api.AddComment(oParagraph, "comment", "John Smith");
var aComments = oDocument.GetAllComments();
aComments[0].AddReply("reply1", "Mark Potato", "uid-2", 0);
var oCommentReply = aComments[0].GetReply(0);
oCommentReply.SetAuthorName("Hamish Mitchell");
oCommentReply.SetText("new reply");
oCommentReply.SetUserId("uid-1");
var sType = oCommentReply.GetClassType();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("Class type: " + sType);
var sAuthor = oCommentReply.GetAuthorName();
oDocument.Push(oParagraph);
oParagraph = Api.CreateParagraph();
oParagraph.AddText("Comment reply author: " + sAuthor);
oDocument.Push(oParagraph);
var sText = oCommentReply.GetText();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("Comment reply text: " + sText);
oDocument.Push(oParagraph);
var sUserId = oCommentReply.GetUserId();
oParagraph = Api.CreateParagraph();
oParagraph.AddText("Comment reply user ID: " + sUserId);
oDocument.Push(oParagraph);
builder.SaveFile("docx", "ApiCommentReply.docx");
builder.CloseFile();

Resulting document