I'd like to remove all the comments from a docx file. I can remove the actual comments with a piece of code like is shown below, but I think I also need to remove the comment references from the main document part as well, but I can't figure out how to do that.
Any guidance appreciated!
CommentsPart cmtsPart = wordMLPackage.getMainDocumentPart().getCommentsPart();
org.docx4j.wml.Comments cmts = cpart.getJaxbElement();
List<Comments.Comment> coms = cmts.getComment();