Access Outlook default folder

旧城冷巷雨未停 提交于 2019-11-28 11:33:30

You can use the Folders property, and string multiple Folders properties together, to get at any folder in the namespace. Some examples

The Inbox (same as GetDefaultFolder(olInbox))

ns.Folders("Personal Folders").Folders("Inbox")

A subfolder of Inbox named Backup

ns.Folders("Personal Folders").Folders("Inbox").Folders("Backup")

The OtherInbox at the same level as Personal Folders

ns.Folders("OtherInbox")

The GetDefaultFolder is good for quickly getting to a default folder, but if you need something other than the default, just navigate down the tree with the Folders property of the NameSpace object.

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