0

我使用EWS托管API目前设置自定义ExtendedPropertiesCalendarFolder(C#):读ExtendedProperties外接

myCalendar.SetExtendedProperty(customExtendedProperty, true); 

我还可以使用托管API加载这些设置时,我绑定CalendarFolder

var myCalendar = CalendarFolder.Bind(service, folderId, requestedPropertySet); 

我接下来会喜欢读这些相同ExtendedProperties,而是从Outlook加载使用Office JavaScript库。

从Outlook库的外观不公开任何方法Office.context.item访问ExtendedProperties

库中是否有方法允许我访问它?如果不是,我可以使用URL路径中具有GUID的模式方法("http://schemas.microsoft.com/mapi/string/{00020329-0000-0000-C000-000000000046}/yourProp")吗?

回答

2

要在Addin中访问您自己的文件夹自定义属性,您需要使用makeEwsRequestAsync https://dev.outlook.com/reference/add-ins/Office.context.mailbox.html#makeEwsRequestAsync在Addin中执行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

+0

我不知道有一种方法可以分析发送的SOAP消息。那是失踪的一块。谢谢! –