输入的 Word 文档:

【C#】
using Spire.Doc;namespace CompareWordDocuments{class Program{static void Main(string[] args){//Create a Document instanceDocument doc1 = new Document();//Load the first Word documentdoc1.LoadFromFile("Doc1.docx");//Create a Document instanceDocument doc2 = new Document();//Load the second Word documentdoc2.LoadFromFile("Doc2.docx");//Compare the two Word documentsdoc1.Compare(doc2, "Shawn");//Save the result to filedoc1.SaveToFile("Result.docx");doc1.Dispose();}}}
【VB.NET】
Imports Spire.DocNamespace CompareWordDocumentsClass ProgramPrivate Shared Sub Main(ByVal args As String())‘Create a Document instanceDim doc1 As Document = New Document()‘Load the first Word documentdoc1.LoadFromFile("Doc1.docx")‘Create a Document instanceDim doc2 As Document = New Document()‘Load the second Word documentdoc2.LoadFromFile("Doc2.docx")‘Compare the two Word documentsdoc1.Compare(doc2, "Shawn")‘Save the result to filedoc1.SaveToFile("Result.docx")doc1.Dispose()End SubEnd ClassEnd Namespace
输出:

欢迎下载|体验更多E-iceblue产品
如需获取更多产品相关信息请咨询在线客服

标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!