Welcome to Peter's Webplace Sign in | Join | Help

How to create new folder in Outlook 2003 (C#) ?

It's pretty simple:

Application outlookApp = new Application ();
NameSpace ns = outlookApp.GetNamespace ("MAPI");
// Our new folder will be in this base folder (default inbox folder)
MAPIFolder baseFolder = ns.GetDefaultFolder (OlDefaultFolders.olFolderInbox);
// Create the new inbox folder with name "My New Folder" in base folder
MAPIFolder myNewFolder = baseFolder.Folders.Add ("My New Folder", OlDefaultFolders.olFolderInbox);

 

Share this post: Email it! | bookmark it! | digg it! | reddit!
Published Friday, January 14, 2005 5:07 AM by peterj
Filed Under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

What do you think?

(required) 
required 
(required)