62,041
社区成员
发帖
与我相关
我的任务
分享
#region 文件比对
public ActionResult FileCompare()
{
object file1Path = @"D:\\02.docx";
object file2Path = @"D:\\01.docx";
Document _wordDocument = _wordApplication.Documents.Open(file1Path);
Document _wordDocument2 = _wordApplication.Documents.Open(file2Path);
try
{
Document documents = _wordApplication.CompareDocuments(_wordDocument, _wordDocument2);
}
catch (Exception)
{
return Content("文件对比过程中文件" + file2Path + "已经保存,不能再进行对比!", "文件对比失败");
}
return View();
}
#endregion