Free Support Forum - aspose.com

Access the comments in Aspose which have been added by the users in the microsoft word

Hi all,

when we create a word document with Aspose java and then open it inside the Microsoft Word, the users can edit the document (e.g. add some extra comments to the document). Is it possible to open the document again in Aspose and get the comment text which have been added by the users?

Thanks in advance,
Marzie

Hi Marzie,


Thanks for your inquiry. You can get Comment’s text using following code:
for(Comment comment : (Iterable<Comment>) doc.getChildNodes(NodeType.COMMENT, true))
System.out.println(comment.toString(SaveFormat.TEXT));
I hope, this helps.

Best regards,

Hi Awais,

this code only works for the comments which we have defined programmatically in Aspose? I mean if the users in Ms Word add some comments by dragging and drop the comments into the document?

Regards,
Marzie

Hi Marzie,


Thanks for your inquiry. Please attach your sample Word document containing the comment that you want to extract text from here for testing. We will investigate the scenario on our end and provide you more information.

Best regards,