查找 Outlook.MAPIFolder 的类型

发布于 2024-07-09 23:10:23 字数 211 浏览 3 评论 0原文

我正在为应用程序构建 Outlook 控件,并通过递归添加子文件夹来填充树列表。 这些文件夹被声明为 Outlook.MAPIFolder。 但该应用程序只允许从实际电子邮件导入,因此我想排除包含日历项目的文件夹。 我可以右键单击 Outlook 中的这些文件夹,转到属性,然后将类型视为“包含日历项目的文件夹”。 但我似乎无法在 VB.Net 中以编程方式实现这一点。 我错过了一些简单的事情吗?

I'm building an outlook control for an application, and am populating a treelist by recursively adding child folders. These folders are declared as Outlook.MAPIFolder. But the application only allows import from actual emails, so I want to exclude folders containing calendar items. I can right click on those folders in outlook, go to properties, and see type as "Folder containing Calendar Items". But I don't seem to be able to get at that programmatically in VB.Net. Am I missing something simple?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

吻泪 2024-07-16 23:10:23

如果您只需要邮件文件夹,只需检查文件夹的 DefaultItemType 属性是否为 olMailItemolPostItem

默认项目类型
http://msdn.microsoft。 com/en-us/library/microsoft.office.interop.outlook.mapifolder.defaultitemtype.aspx

OlItemType 枚举:
http://msdn.microsoft.com/ zh-cn/library/microsoft.office.interop.outlook.olitemtype.aspx

If you only want mail folders just check whether the folder's DefaultItemType property is olMailItem or olPostItem.

DefaultItemType:
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.mapifolder.defaultitemtype.aspx

OlItemType Enumeration:
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.olitemtype.aspx

花开柳相依 2024-07-16 23:10:23

对象上的 MessageClass 将告诉您正在处理的对象类型。 MessageClass 还确定对象将位于哪个文件夹以及将显示什么形式来呈现它。

以下是参考:

http://msdn.microsoft。 com/en-us/library/aa171490(office.11​​).aspx

HTH

The MessageClass on the object will tell what type of object you are dealing with. The MessageClass also determines which folder the object will live in and what form will be displayed to render it.

Here is a reference:

http://msdn.microsoft.com/en-us/library/aa171490(office.11).aspx

HTH

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文