Free Support Forum - aspose.com

Get the text marked by a comment

In Aspose.Words, is it possible to get the text that is marked by a comment? If I highlight the word “dog” in a document and attach a comment to it, I want to know if Aspose.Words can give me “dog” associated with the given comment. I know I can get comments and information about the comment but it doesn’t seem to know what it was commenting on.

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for your interest in Aspose.Words. The latest version of Aspose.Words for java already supports comment’s ranges. So using the latest version, you can get commented text. Please see the following link to learn more about this feature:

http://www.aspose.com/community/blogs/aspose.words-product-family/archive/2010/03/05/comment-ranges-are-now-supported-in-aspose-words-for-net-and-java.aspx

So to extract commented text, you should just extract text of nodes between CommentRangeStart and CommentRangeEnd. Please let me know if you need more assistance, I will be glad to help you.

You can download the latest version of Aspose.Words for Java from here:

http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/category1378.aspx

Best regards.