问题描述
MSDN说这个的在MAPIFolder接口(Outlook中的编程与WPF):
MSDN says this of the MAPIFolder interface (Outlook programming with WPF):
此接口德precated;不要 使用该接口。而是使用 接口文件夹访问所有的方法, 在COM属性和事件成员 目标文件夹。
我想获得草稿文件夹,如下所示:
I am trying to get the Drafts folder like so:
Outlook.MAPIFolder oFolder = olNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderDrafts);
我要如何做上述不使用MAPIFolder(这是德precated)?我想我不明白MSDN是说(使用文件夹界面访问所有的方法等)
How do I do the above without using the MAPIFolder (which is deprecated)? I guess I don't understand what MSDN is saying (using the Folder interface to access all method etc)
推荐答案
您只需将其转换为Outlook.Folder,即
You simply cast it to Outlook.Folder, i.e.
Outlook.Folder oFolder = (Outlook.Folder) olNS.GetDefaultFolder( Outlook.OlDefaultFolders.olFoderDrafts)
不可否认,在MSDN比较混乱那里。你可以把文件夹界面围绕MAPIFolder的包装中,对事件的其他支持。
Admittedly, the MSDN is rather unclear there. You can think of the Folder interface as a wrapper around the MAPIFolder, with additional support for events.
在我的阿里纳斯,我想借此事与一粒盐整个'pcated德$ P $。我敢打赌MAPIFolder在这里留下来,至少有一对夫妇多个版本的Outlook。
As I sidenote, I would take the whole 'deprecated' thing with a grain of salt. I'd bet MAPIFolder is here to stay, at least for a couple more versions of Outlook.
这篇关于MAPIFolder德precated所以解决方法展望编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!