C# VSTO Outlook 2007 / Sharepoint:AddIn 不会保存联系人项目

发布于 2024-07-15 23:19:46 字数 528 浏览 5 评论 0原文

有人可以帮忙吗:我有一个加载项,可以从 Sharepoint 服务器读取联系人。 用户可以加载联系人并进行一些更改或创建新联系人。 在他看来,保存该项目效果很好。 表单关闭,项目正在传输到 Sharepoint。 但是,如果用户再次重新打开同一联系人并尝试进行简单的更改,则不再可能进行保存:无法保存该元素,因为它已被其他用户或窗口更改。 您想在标准文件夹中放置一个副本吗?”(这是我从德语翻译成英语的翻译...)用户必须重新启动 Outlook 才能进行更改!我不知道为什么会出现“fxxx”这种情况。

我连接到“写入”事件来检查一些权限,如果一切正常,我会执行一个操作

Marshal.ReleaseComObject(item);
this.Dispose();

并调用垃圾收集器:

GC.WaitForPendingFinalizers();
GC.Collect();

即使我将这些行写入 FormRegionClosed-Method 中,问题仍然存在。

can somebody help: i have an AddIn which reads contacts from a Sharepoint Server.
The user can load a contact and make some changes or create a new one. At his point, saving the item works well. The Form closes and the item is beeing transfered to Sharepoint.
But if the user reopens the same contact again and trys to make a simple change, saving is no more possible: The element could not be saved because it was changed by another user or window. Would you like to place a copy in your standard folder" (this a my translation from german to english...) The user must restart Outlook to make his change! I dont know, why the "fxxx" this happens.

I hook into the "Write" event to check some rights and if all is ok i do a

Marshal.ReleaseComObject(item);
this.Dispose();

and call the Garbage Collector:

GC.WaitForPendingFinalizers();
GC.Collect();

Even i write these lines into the FormRegionClosed-Method the problem stays the same.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

硪扪都還晓 2024-07-22 23:19:46

耶哈哈:发现问题了!

在 AddIn-Startup 中有一个事件处理程序,用于设置当前项目的消息类。
该商品也必须经过 Marshall 处理

Yeehaaaa: found the problem!

in AddIn-Startup a have an event handler for setting the message class on the current item.
This item has to be Marshall'd too

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