前面我们介绍了如何使用spire.doc 。在word 2013及以上版本中,可以对word文档中的批注进行回复。spire.doc 可以调用replytocomment()方法回复批注。该文将详细介绍如何使用c#, vb.net回复批注。
in c#
document doc = new document();
doc.loadfromfile("sample.docx");
comment comment = doc.comments[0];
comment replycomment = new comment(doc);
replycomment.format.author = "e-iceblue";
replycomment.body.addparagraph().appendtext("回复批注");
comment.replytocomment(replycomment);
doc.savetofile("replytocomment.docx", fileformat.docx2013);
in vb.net
dim doc as new document()
doc.loadfromfile("comment.docx")
dim comment as comment = doc.comments(0)
dim replycomment as new comment(doc)
replycomment.format.author = "e-iceblue"
replycomment.body.addparagraph().appendtext("回复批注");
comment.replytocomment(replycomment)
doc.savetofile("replytocomment.docx", fileformat.docx2013)