如何判断 Outlook 中的会议邀请是否已发送? [英] How can you tell if invitations have been sent for a meeting in Outlook?

查看:223
本文介绍了如何判断 Outlook 中的会议邀请是否已发送?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 C# 为 Outlook 编写 COM 加载项.如果已保存会议但未发送邀请,Outlook 会在表单顶部放置一条消息,说明尚未发送邀请.如何以编程方式确定尚未发送会议邀请?

I am writing a COM add-in for Outlook using C#. If a meeting was saved and invitations were not sent, Outlook puts a message at the top of the form saying the invitations have not been sent. How do I determine programmatically that invitations have not been sent for a meeting?

我尝试检查每个 Recipient 并检查 MeetingResponseStatus.如果邀请尚未发送,我希望它是 OlResponseNone,如果邀请已发送但没有收到响应,我希望它是 OlResponseNotResponded.但是,对于尚未收到邀请或尚未回复的收件人,我总是收到 OlResponseNone.因此,我无法区分未发送邀请的会议和已发送邀请但无人回复的会议.

I tried examining each Recipient and checking the MeetingResponseStatus. I would expect it to be OlResponseNone if the invitation has not been sent but OlResponseNotResponded if the invitations have been sent but no responses have been received. However, I always get OlResponseNone for recipients that either haven't been sent an invitation or that have but have not yet reponded. I therefore can't tell apart a meeting where invitations haven't been sent from one where they have been sent but no one has responded.

我在 Outlook 2007 中完成了大部分测试,但我相信 2003 年和 2010 年也是如此,我需要支持所有这些.

I've done most of my testing in Outlook 2007, but I believe the same holds true for 2003 and 2010, all of which I need to support.

推荐答案

我在 这篇文章.我需要阅读 DASL 属性http://schemas.microsoft.com/mapi/id/{00020329-0000-0000-C000-000000000046}/80BE0102".在 Outlook 2007 和 leter 中,您可以使用 PropertyAccessor 执行此操作,如下所示:

I found a partial answer in this post. I need to read the DASL property "http://schemas.microsoft.com/mapi/id/{00020329-0000-0000-C000-000000000046}/80BE0102". In Outlook 2007 and leter, you can do this with a PropertyAccessor as follows:

appointment.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/id/{00020329-0000-0000-C000-000000000046}/80BE0102");

但是,我还需要支持 Outlook 2003,并且在 Outlook 2007 中添加了 PropertyAccessor 属性.因此我能够使用 Redemption 的 RDOMMail 对象,代码如下(省略了错误处理).

However, I need to also support Outlook 2003, and the PropertyAccessor property was added in Outlook 2007. I was therefore able to use Redemption's RDOMail object with the following code (error handling omitted).

var _session = New RDOSession();
_session.Logon();
var _message = _session.GetMessageFromID(appointment.EntryID, ((Outlook.MAPIFolder)appointment.Parent).StoreID);
return (bool)_message.Fields["http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/8229000B"];
Marshal.ReleaseComObject(_message);
_session.Logoff();
Marshal.ReleaseComObject(_session);

这篇关于如何判断 Outlook 中的会议邀请是否已发送?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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