gpt4 book ai didi

c# - Outlook 2010 自动完成流(缓存联系人)

转载 作者:行者123 更新时间:2023-11-30 17:10:49 30 4
gpt4 key购买 nike

我目前正在尝试开发一个 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 中提到的不同

最佳答案

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");

使用描述here访问 byte[] 中的字段。我完成了它正常工作的代码。您只需要遍历每个字节并在访问时检查数据类型。

关于c# - Outlook 2010 自动完成流(缓存联系人),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11770955/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com