【发布时间】:2023-04-02 13:25:01
【问题描述】:
我目前正在尝试开发一个 Outlook 插件。为了实现非功能性要求,我需要访问存储在 .nk2 文件中的 Outlook 缓存联系人。我参考了这个post,但不知道该怎么做。
已编辑(答案):
Microsoft.Office.Interop.Outlook.Application oApp = Globals.ThisAddIn.Application;
Microsoft.Office.Interop.Outlook.MAPIFolder inboxFolder = oApp.GetNamespace("MAPI").GetDefaultFolder(OlDefaultFolders.olFolderInbox);
StorageItem storage = inboxFolder.GetStorage("IPM.Configuration.Autocomplete", OlStorageIdentifierType.olIdentifyByMessageClass);
//IPM.Configuration.Autocomplete
PropertyAccessor propertyAcc = storage.PropertyAccessor;
byte[] got = propertyAcc.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x7C090102");
目前我被困在访问字节数组中,当我访问数组时,值与post中提到的不同
【问题讨论】:
-
欢迎来到Stack Overflow。您能告诉我们您在阅读文章的哪些部分时遇到了困难吗?你看过the new Outlook 2010 MAPI Reference吗?您是否在寻找代码示例。
-
mm 没有查看新的 Outlook 2010 MAPI 参考。我被困在@访问 MAPI 属性 PidTagRoamingBinary 中,该属性位于邮件帐户传递存储的收件箱的关联内容表中的隐藏消息。
标签: c# autocomplete outlook