检测 Outlook 2007 中的自动存档设置/存储
我想编写一个简单的 Outlook 2007 AddIn,允许我手动自动存档邮件。 也就是说,我右键单击一封邮件,选择“自动存档”,它就会移至我的“存档”文件夹中。
不幸的是,我似乎无法检测哪一个是存档存储。 我知道 Application.GetNamespace("MAPI").Stores 是我所有商店的列表,其中包括我的存档商店。 但我似乎没有找到一种方法来检测商店是否是存档商店。
在建议对 store.DisplayName 进行简单字符串匹配之前,请记住本地化(在德语中,商店是“Archivordner”,这与英语明显不同)。
我认为可以访问“自动存档”设置来获取文件名,然后与 store.FilePath 进行匹配,但我无法在任何地方找到此设置。
有什么建议么?
I want to write a simple Outlook 2007 AddIn that allows me to manually Auto-Archive mails. That is, I right-click a mail, select Auto-Archive and it gets moved into my Archive folder.
Unfortunately, I do not seem to be able to detect which one is the Archive Storage. I know that Application.GetNamespace("MAPI").Stores is a list of all my stores, and this includes my Archive Store. But I do not seem to find a way to detect if a store is the Archive Store or not.
Before you recommend simple string matching against store.DisplayName keep in mind localization (in German, the Store is "Archivordner", which is obviously different from the english one).
I was thinking that it could be possible to access the Auto Archive setting to get the Filename and then match against store.FilePath, but I am unable to find this setting anywhere.
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的,找到了。 秘密是 IPC.MS.Outlook.AgingProperties,它有点奇怪且没有记录,但对我来说已经足够了。
Okay, found it. The Secret is IPC.MS.Outlook.AgingProperties and it's a bit weird and undocumented, but it's good enough for me.