Adds a comment to the document.
Name | Type | Description |
sText | string | The comment text (required). |
sAuthor | string | The author's name (optional). |
builder.CreateFile("docx"); var oDocument = Api.GetDocument(); var oParagraph = oDocument.GetElement(0); oParagraph.AddText("This is just a sample text."); oParagraph.AddLineBreak(); oParagraph.AddText("The comment was added to this document."); oDocument.AddComment("This is a comment to the document.", "Jane"); builder.SaveFile("docx", "AddComment.docx"); builder.CloseFile();