Project Niobe

Every once in a while, it’s nice to let off steam and blog about a project you’ve been working on for the past few months.  Well, it’s my turn and the project in question is a prototype I’ve been working on with a number of customers and third party system integrators.  This is not related to any internal product in Microsoft, and not the beginnings of one – merely an exercise to see how flexible creating an object model in .NET can be.


Today, if you want to develop applications that integrate with Microsoft Outlook, you need to be fairly proficient in VBA, COM and/or MAPI.  Although there is the option within Visual Studio .NET to develop in a managed language and make calls into Outlook, the interface is effectively a managed wrapper over existing COM objects.  I wrote about my findings of doing this in an MSDN article in 2002.


Project Niobe is prototype code that abstracts the VBA, COM and MAPI layers into a single managed object model.  From here, you can develop applications that integrate with Microsoft Outlook using existing technologies, but develop against an object model that’s more in-line with the design of the classes and namespaces in the .NET Framework.


The easiest way to show this is with an example.  I want to create a new contact in Outlook and add this contact to my default contact folder.   Here is the code using Niobe:


using Niobe.Outlook;


Contact c = new Contact(“Bill”,”Gates”);

c.BusinessTelephoneNumber = “425 123 4567”;




In addition to creating new objects, the object model also allows you to handle existing events from within Outlook.  For example:


TaskFolder.DefaultFolder.ItemAdded += new ItemEventHandler(DefaultFolder_ItemAdded);


private void DefaultFolder_ItemAdded(Item item)


     Task newTask = (Task)item;

     MessageBox.Show(“Lets make a Web Service call and tell it about this new task: “+



     // imagine a call to a web service that passed this task as a parameter



Finally, objects can expose their data in various ways.  For example:


// To return a strongly typed dataset containing the contents of your default contact folder:



// To iterate through a folder containing contacts and display location

foreach(Contact c in ContactFolder.DefaultFolder)


            MessageBox.Show(c.FullName+“, “+c.City+“ “+c.State);



So, while this all looks like Office programming nirvana, let me remind you that there are of course some caveats.  Niobe is called a prototype for good reason.  It’s unsupported, will never be released, and has its fair share of bugs and feature requests.  I’m hoping that by posting it as a GotDotNet workspace (which you can check out at, other developers that are writing applications that integrate with Outlook can maybe learn from some of the approaches that have been taken.


Looking to the future, it’s clear that the advantages of WinFX, WinFS and centralized schemas will undoubtedly provide a new way of accessing data – and will replace some application-based APIs.   Until we are able to take advantage of this new technology however, this project has shown some interesting possibilities with today’s version of Outlook.

Comments (12)

  1. stefan says:


    I’ve never understood why MS does not provide managed APIs for things like

    Outlook and IE

  2. Don’s suppose you’ve come across a way to directly add Tasks to an Exchange folder?

  3. Oooooh, sounds great! Good luck with the project. Will this object model still throw up the HELL dialog when accessing the restricted props/method/objects? Of course you could leave it out so Dmitry can continue making a little bit of coin with Redemption…

  4. Simon says:

    Eric, there is an option to enable/disable access to the fields that cause this security dialog. If you disable access, the runtime returns a null value when an add-in tries to access one of the restricted fields.

    Alternatively, you can enable this and then sign and register the runtime (as you would with any other trusted COM add-in).

  5. Simon says:


    You can add tasks to any folder, but with Niobe it must be driven by the client. For example, the following code would work if you wanted the user to pick a folder to add tasks to:

    //Ask the user to pick a folder

    Folder folder = application.FolderPicker();

    if (folder is TaskFolder)


    TaskFolder taskFolder = (TaskFolder)folder;

    Task newTask = new Task("Buy gift for Simon");

    newTask.PercentComplete = 95;




  6. When, will this SDK will be available to general public?

    Sounds very cool, Maxim

  7. Simon says:


    It is available to the public today. Go to – download the source and/or binaries. You can also apply to join the workspace.

  8. Gyorgy says:


    Is it possible to write an external console application that uses the Niobe SDK to manage Outlook contacts, or it is only for add-ins?

  9. Simon says:


    Currently, any calls must be made from a process that is launched by Outlook. You could of course think about creating an add-in that listened on a port or web service and talk to it from an external application that way…

  10. In the bag tonight: A little poetry from Ted Kooser; Microsoft is watching us; cut and paste as not HTML; Good Eats; On being an MVP; NetCetra; Omaha PHP Meetup; Being 100% Kerry; GooFresh; Book hunting; Office automation and XML; The new Alerts SDK; SQL Server as an object store; SSL and Certificate Server; The power of VSTO; OPM T-shirts; the Craft Brand Alliance; Smart Cosumers and Good Products; 90% of web apps vulnerable to hackers; Friendly Fire; People complain about fixing IE?; A bug remains after the IE Patch;

  11. sharper says:

    when i using the Niobe dlls, registered the RssModule ,

    start outlook2003, then report a exception,

    its mean, cant not found some objects?