How can i create new contact folder?

Sep 27, 2013 at 1:17 PM
Edited Sep 27, 2013 at 2:22 PM
I need to create a new contact folder in outlook contacts then i need to add some contacts inside this newly created folder.

I'm be able to create a new contact inside the default folder, but i can't create new folder and use it to add some specific contacts.

my not working code:
    Outlook.Application outlookApplication = new Outlook.Application();
            Outlook._NameSpace outlookNS = outlookApplication.GetNamespace("MAPI");
            Outlook.MAPIFolder objDefaultContactsFolder = outlookNS.GetDefaultFolder(OlDefaultFolders.olFolderContacts);

            //Outlook.MAPIFolder InboxFolder = oNS.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);
            Outlook.MAPIFolder customFolder = default(Outlook.MAPIFolder);
                customFolder = objDefaultContactsFolder.Folders.Add("Authorcode", objDefaultContactsFolder);
            catch (System.Exception ex)
                MessageBox.Show("The following error occurred: " + ex.Message);

can someone help me?

thank you
Sep 29, 2013 at 10:05 PM
did you got an exception? whats in it? do you work with an exchange server behind?
please gimme more details.