Microsoft.Office.Interop.MSProject - 当我尝试打开文件时,为什么它们总是被锁定(被我锁定!)?

发布于 2024-08-18 00:46:39 字数 426 浏览 5 评论 0原文

我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ぇ气 2024-08-25 00:46:39

我想到了两件事,首先看看您的代码中是否在其他地方打开了文件。
其次查看后台是否有进程使用该文件。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文