您的位置:首页 > 其它

同时启动了多个word的exe,word退出的时候,会报警告“此文件正由另一个应用程序或用户使用” normal.dot

2009-11-16 18:48 405 查看
现象:同时启动了多个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);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐