现象:同时启动了多个word的exe,word退出的时候,会报警告“此文件正由另一个应用程序或用户使用”。
原因:多个word exe不能用时用.dot模板
解决:Word退出代码(C#)
Word_doc.SaveAs(ref savePath, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing); //避免弹出normal.dot被使用的对话框 Word_App.NormalTemplate.Saved = true; //关闭Word Word_doc.Close(ref oMissing, ref oMissing, ref oMissing); Word_App.Quit(ref oMissing, ref oMissing, ref oMissing);