views:

275

answers:

1

Hi all, I am using .net framework 3.5 by using C# to configure outlook 2007 I need to import all categories from outlook 2007 to my application particularly on dropdownlist, i want to listed all the categories from outlook to one combobox in my application, i don't know how to get all the categories,

if anyone know reply

A: 

In a new 'Office' type project in visual studio (Outlook AddIn):

NameSpace nameSpace = Application.GetNamespace("MAPI");

foreach(var cat in nameSpace.Categories)
{
      //Add cat to your combo box      
}
James Allen