Click here to Skip to main content
13,044,539 members (59,018 online)
Click here to Skip to main content
Add your own
alternative version


13 bookmarked
Posted 2 Mar 2009

Outlook Interop, Including Distribution Lists

, 2 Mar 2009
Rate this:
Please Sign up or sign in to vote.
Re-usable code to manage Outlook.


Apparently, the DLLs for interop with Outlook have changed through the years. After unsuccessfully trying literally hundreds of articles while searching for online-submitted source code for Outlook interop (even the documentation on MSDN was quite confusing), I decided to create my own code.

The submitted, zipped, working code provided is very terse, fairly easy to understand, and is even easier to employ. The code worked well on an older IBM laptop with the XP-Pro Operating System and Office 2003.

Using the code

To re-use the code, use the ofOutlook.h and ofOutlook.cpp files in your Visual Studio project. Then, simply use an include directive, such as demonstrated in the (Form1.h) file, then add the methods that you would like to have in your form... or even in command-line/non-GUI programs.

The files are very small, once unzipped. A snippet from one of the files follows:

// A snippet from ofOutlook.h containing the initial declarations that 
// will identify the locations necessary for the Microsoft DLL to work.
   static Outlook::ApplicationClass^ myOutlook = gcnew Outlook::ApplicationClass();
   static Outlook::NameSpace^ myNs = myOutlook->GetNamespace("MAPI");
   static Outlook::MAPIFolder^ folderContacts = 

Points of interest

This code was functional as of early December's upgrades to XP and Office 2003. But your mileage may vary - YMMV (for Europeans, your consumption may vary).


This is the original article.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Ralph in Boise
Web Developer
United States United States
No Biography provided

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 2 Mar 2009
Article Copyright 2009 by Ralph in Boise
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid