Recognize the type of the clicked folder in outlook

H

Hichem Sarrai

Hi,
In my code for the outlook addin I am trying to enable/disable
commandbarbuttons from the tool bar depending on the folder I am clicking on.
When I open some "folders" (such as "MailBox MyName") the explorer is
temporarly closed so I can't check the explorer.Selection wich throws an
exception.
How can I recognize the type of folder so that I adapt my add-in
appearance.(I am using the event SwitchFolder)

Thank you for your help...
 
H

Hichem Sarrai

I hope you understood my question.
All the folders I am talking about have the the same
MAPIFolder.DefaultItemType wich is olMailItem!
=> How can I differentiate folders that holds items and open them in an
explorer, and folders that do not show items(do not have item) and are
considered as colsed explorer such as the root folder "Mailbox toto" ??

Thank you
 
D

Dmitry Streblechenko

The root IPM folder (the parent of Inbox and most other special folders),
can have items just fine, it is just Outlook shows an HTML page instead of
an explorer list view.
Check if the MAPIFolder.WebViewOn is true.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
H

Hichem Sarrai

Yes. This is it.
Thank you for your help...



Dmitry Streblechenko said:
The root IPM folder (the parent of Inbox and most other special folders),
can have items just fine, it is just Outlook shows an HTML page instead of
an explorer list view.
Check if the MAPIFolder.WebViewOn is true.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 

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