Identifying Root Folder

Add-in Express™ Support Service
That's what is more important than anything else

Identifying Root Folder
Rup Go

Posts: 64
Joined: 2007-03-01

I'm trying to detect if the user had clicked the root folder

Outlook._Explorer explorer1 = OutlookHost().ActiveExplorer();
Outlook.MAPIFolder folder = explorer1.CurrentFolder;
Outlook.MAPIFolder parent = folder.Parent as Outlook.MAPIFolder;

i tried

if(parent == null)"this is root folder");

doesn't show the message, it means its not null. Anyone know a better way to know if it is a root folder or not?

thanks a lot

Posted 20 Apr, 2007 03:39:36 Top
Sergey Grischenko

Add-in Express team

Posts: 7233
Joined: 2004-07-05
Hi Rup.

If the parent is not 'null', that means you get another folder and you just need to cast the parent to the MAPIFolder interface and check the parent again until you get the 'null' value.

P.S. Note that we take up your forum requests in the order we receive them. Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 20 Apr, 2007 09:33:29 Top