SetText
Sets the comment text.
Parameters:
Name |
Type |
Description |
sText |
string
|
The comment text. |
Returns:
- Type
-
ApiComment
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].SetText("new comment");
builder.SaveFile("docx", "SetText.docx");
builder.CloseFile();
Resulting document