C# 如何回复Word批注

 时间:2024-11-19 19:38:40

此条经验将介绍如何通过C# 来回复Word批注。

工具/原料

Free Spire.Doc for .NET 6.3(社区版)

Visual Studio

dll引用

1、在E-iceblue官网或者Nuget网站上下载Free Spire.Doc for .NET的安装包后,注意在编辑代码时,添加引用Spire.Doc.dll到程序。dll文件可在安装路径下的Bin文件夹中获取。

C# 如何回复Word批注

C#(供参考)

1、using Spire.Doc;using Spire.Doc.Fields;namespace ReplyComment_Doc{ class Program { static void Main(string[] args) { //实例化Document类,加载文件 Document doc = new Document(); doc.LoadFromFile("test.docx"); //获取第一个批注 Comment comment = doc.Comments[0]; //实例化Comment类,添加批注回复作者以及回复内容 Comment replyComment = new Comment(doc); replyComment.Format.Author = "Adam"; replyComment.Body.AddParagraph().AppendText("这条批注内容请再丰富一下,内容有些单调"); comment.ReplyToComment(replyComment); //保存文件并打开 doc.SaveToFile("ReplyToComment.docx", FileFormat.Docx2013); System.Diagnostics.Process.Start("ReplyToComment.docx"); } }}

2、批注回复效果:

C# 如何回复Word批注
  • Word里面怎么添加批注和回复批注
  • C# 插入、修改、删除Word批注
  • C# 读取Word批注内容
  • word批注怎么用
  • Word添加批注怎么做,怎么写批注
  • 热门搜索
    舍本逐末是什么意思 韩国烤肉的腌制方法 君子兰的养殖方法 白化病是什么 视力模糊是什么原因 吸烟有什么危害 干巴爹是什么意思 务必什么意思 什么是勇敢 乔丹运动鞋