Microsoft.Office.Interop.MSProject - 当我尝试打开文件时,为什么它们总是被锁定(被我锁定!)?
我正在尝试使用 Interop 来操作 MS Project 2003 (MPP) 文件。
我的问题是 MS Project 报告这些文件已被另一个用户(我!)打开,并且我只能以只读方式打开它。
显然,我尝试重新启动 studio,然后重新启动 windows(xp),但没有效果。 文件的只读文件属性被清除。
对我可以尝试什么有什么建议吗?
谢谢,
Anders
导入 Microsoft.Office.Interop.MSProject ... 调暗应用程序 As ApplicationClass = New ApplicationClass() 应用程序可见 = False Dim success As Boolean = app.FileOpen(fullPath, False)
I'm trying to use Interop to manipulate MS Project 2003 (MPP) files.
My problem is that MS Project reports that the files is already opened by another user (me!) and that I can open it only as read-only.
Obviously, I've tried to restart studio, then windows (xp) but with no effect.
The file attribute for Readonly is cleared on the file.
Any suggestions for what I might try?!
Thanks,
Anders
Imports Microsoft.Office.Interop.MSProject
...
Dim app As ApplicationClass = New ApplicationClass()
app.Visible = False
Dim success As Boolean = app.FileOpen(fullPath, False)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想到了两件事,首先看看您的代码中是否在其他地方打开了文件。
其次查看后台是否有进程使用该文件。
tow things came to my mind, first see if in your code your opening the file elsewhere.
second see if there is a process in the background using the file.