我目前正在使用 EWS Managed API (C#) 在 CalendarFolder
上设置自定义 ExtendedProperties
:
myCalendar.SetExtendedProperty(customExtendedProperty, true);
我还可以在绑定(bind) CalendarFolder
时使用托管 API 加载这些设置:
var myCalendar = CalendarFolder.Bind(service, folderId, requestedPropertySet);
接下来,我想读取这些相同的 ExtendedProperties
,但是来自使用 Office JavaScript 库的 Outlook 加载项。
从 Outlook 库的外观来看,它没有公开 Office.context.item
的任何方法来访问 ExtendedProperties
。
库中是否有允许我访问它的方法?如果没有,我可以使用在 URL 路径中具有 GUID 的架构方法 ("http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/yourProp"
)?
最佳答案
要在插件中的文件夹上访问您自己的自定义属性,您需要使用 makeEwsRequestAsync https://dev.outlook.com/reference/add-ins/Office.context.mailbox.html#makeEwsRequestAsync在您的插件中执行 GetFolder。要获得正确的 SOAP 消息,只需在您的 EWS 托管 API 代码中启用跟踪,该代码将输出使用的 SOAP https://msdn.microsoft.com/en-us/library/office/dn495632(v=exchg.150).aspx您可以将其转置。需要注意的一件事是在您的应用程序中创建 makeEwsRequestAsync 的安全要求,例如 ReadWriteMailbox http://dev.office.com/docs/add-ins/outlook/understanding-outlook-add-in-permissions
关于javascript - 从 Outlook 加载项读取扩展属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38982931/