Outlook 2010自动完成流(缓存的联系人) [英] Outlook 2010 autocomplete stream ( cached contacts)
问题描述
我目前正在尝试开发Outlook插件.为了实现非功能性需求,我需要访问存储在.nk2文件中的Outlook缓存联系人.我指的是这个发布,但不知道该怎么做.
I'm currently trying to develop an outlook plugin. As to implement a non functional requirenment I need to access outlook cached contacts which are stored in .nk2 file. I refered to this post but couldn't figure out how to do it.
已编辑(答案)
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");
Currently I'm stuck in accessing byte array, When I accesing the array the values are different than how it's mentioned in this 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);
PropertyAccessor propertyAcc = storage.PropertyAccessor;
byte[] got = propertyAcc.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x7C090102");
使用描述此处访问 byte中的字段[]
.我完成了代码,它可以正常工作.您只需要遍历每个字节并在访问时检查数据类型.
use the description here to access the fields in the byte[]
. I completed the code it's working correctly. You just have to loop through each byte and check for data types when accessing .
这篇关于Outlook 2010自动完成流(缓存的联系人)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!