Outlook Object Library for Visual Studio

Two different versions of MS Office (2007 and 2010) work in our office. Is there a way to integrate Outlook into a C # project and does it work in both versions of Outlook? I added a link to the Microsoft Outlook 14.0 object library, but do they need version 12.0 for Outlook 2007 users or will a newer version work?

+3
source share
3 answers

You should be able to use primary assemblies for interaction. Redirects are redirected, so when you download an application that accesses the primary interop assemblies for 12.0 on a machine with version 14.0 installed, versions 14.0 will be downloaded. This should allow you to develop the same code and work both in 2007 and 2010.

+1
source

Recently, I ran into a similar problem. The software will run from 2007 or 2010. I fixed this by referencing the 2007 libraries (v12.0, as suggested by Slaks) and in the link properties I set "SpecificVersion" to false.

After that, he worked perfectly with 2007 and 2010.

+1
source

2007 (v12.0), , ​​ .

0

Source: https://habr.com/ru/post/1749413/


All Articles