Aspose.Words - Insert Comments

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.write("Some text is added.");

Comment comment = new Comment(doc, "Aspose", "As", new Date());
builder.getCurrentParagraph().appendChild(comment);
comment.getParagraphs().add(new Paragraph(doc));
comment.getFirstParagraph().getRuns().add(new Run(doc, "Comment text."));

Download Source Code

For More Examples, Please Visit Aspose Docs

Last edited May 30, 2014 at 4:07 AM by shoaibkhan, version 1