Word异常:由于文件权限错误,Word无法完成保存 [英] Word Exception : Word cannot complete the save due to a file permission error

查看:245
本文介绍了Word异常:由于文件权限错误,Word无法完成保存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述






我正在使用File创建一个word文件操作。



后来我打开文件,有时候我得到的消息就像,



.doc被锁定以供用户编辑。请参阅下面的代码,



Hi,

I''m creating a word file using File Operation.

Later i''m opening the file, some time i''m getting message like,

.doc is locked for editing by user. see my below code,

Word.Application wdApp = new Word.Application();
object obj = System.Type.Missing;
object docPath = bData.Path;
wdApp.Documents.Open(ref docPath, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj, ref obj);







因此,在做了我的更改后,我在保存方法中出现错误,






So, after doing my changes i''m getting error in the save as method,

wdDoc.SaveAs(ref objDoc, ref obFormat, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing);





我收到类似的错误,



由于文件权限错误,Word无法完成保存。



请帮助我。



I''m getting error like ,

Word cannot complete the save due to a file permission error.

please help me.

推荐答案

这些不是可由代码修复的问题。您需要调查案例1中文件被锁定的原因,以及案例2中不允许您保存在特定目录中的原因。
These are not issues that can be fixed by code. You need to investigate why the file is locked in case 1, and why you are not allowed to save in a particular directory in case 2.


这篇关于Word异常:由于文件权限错误,Word无法完成保存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆