在我的Outlook VSTO区域中,我正在添加所有地址簿中的与会者并查找他们的空闲/忙碌状态,但我总是收到此错误
`
Outlook.NameSpace mapi = Globals.ThisAddIn.Application.GetNamespace("MAPI");
var reci = mapi.CreateRecipient("abc@mydomain.com");
string st = reci.FreeBusy(new DateTime(2016, 3, 10), 60, true);
------------------------------------------------------------------------------
System.Runtime.InteropServices.COMException was unhandled by user code
HResult=-2147352567
Message=Cannot load free/busy information.
Source=Microsoft Outlook
ErrorCode=-2147352567
StackTrace:
at Microsoft.Office.Interop.Outlook.Recipient.FreeBusy(DateTime Start, Int32 MinPerChar, Object CompleteFormat)
`
我也试过从AddressEntry
对象做的,仍然是同样的错误。任何帮助/建议将不胜感激。
编辑:
我已经按照类似帖子的建议使用Recipient. FreeBusy
方法,但我仍然收到错误,我找不到任何有用的信息。
编辑#2: 奇怪的是它适用于第二次尝试,是的尝试/捕获它正在进行第二次尝试,任何想法为什么?