C# – MS Outlook Integration using C#

coutlook

I've already added the COM library of Outlook into my references. The problem is I don't know which version of Outlook the client has installed on his workstation. If I add Outlook 2007 DLL (outlook 12.0 library) then the client who has Outlook 2003 (outlook 11.0 library) can't access my application. It will throw exceptions. How can I fix this problem? Can I add Outlook references dynamically based on the currently installed Outlook version?

Best Answer

You should use Outlook 2003 interop lib. It works for all versions higher than 2003. Or you can implement your own object model for Outlook and use late binding for Outlook.

Related Topic