MSDN说这个的在MAPIFolder接口(Outlook中的编程与WPF):
MSDN says this of the MAPIFolder interface (Outlook programming with WPF):
此接口德precated;不要 使用该接口。而是使用 接口文件夹访问所有的方法, 在COM属性和事件成员 目标文件夹。
This interface is deprecated; do not use this interface. Instead use the interface Folder to access all method, property, and event members of the COM object Folder.
我想获得草稿文件夹,如下所示:
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.