Outlook Object Model - Detecting Mailboxes

蓝咒 提交于 2019-12-02 09:57:45

In Outlook folders can be typed and have a DefaultItemType property. Replacing

if Pos('MAILBOX', UpperCase(mailbox.Item[i].Name)) > 0 then

with

if (mailbox.Item[i].DefaultItemType = olMailItem) then

should give you the folders that by default store only mail messages.

Mail messages can of course be stored in untyped folders as well, but as olMailItem has

olMailItem = $00000000;

as its value, it is the default for all untyped folders as well. So basically any untyped folder by default stores mail items.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!