How do I detect if a folder is public?

M

Mark B

Thanks. Excuse my unfamiliarity with Outlook, but;

1) "Mailbox - user name" or "All Public Folders" means public and "Personal
Folders" means local?

2) If "Mailbox - user name" is found, can I still go upwards to "All Public
Folders"? This might be a more definitive test rather than checking
Left(MAPIFolder.Parent.Name,9) = "Mailbox - ".

Thanks Ken
Mark



Ken Slovak - said:
Keep using MAPIFolder.Parent until you either come to "Personal
Folders", "Mailbox - user name" or "All Public Folders".
MAPIFolder.Parent.Name gives you that.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


Mark B said:
How do I detect from code if a folder is public?

Thanks
Mark
 
K

Ken Slovak - [MVP - Outlook]

"All Public Folders" would be in the Exchange public folders tree.
"Personal Folders" would be a PST file.
"Mailbox - user name" would be an Exchange mailbox.

I'd use the InStr function to check each folder name to see if one of
those strings was present. This could be done in a Select Case block
for example.

Each of those strings would represent a different Outlook
InformationStore. You couldn't go directly from one to the other. The
hierarchy would be as follows:

Mailbox or PST -----> Inbox, etc.
Public Folders ------> All Public Folders ------> various public
folders

Above any of the Mailbox, PST or Public Folders would be
Application.NameSpace.Folders.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top