引用Microsoft.Office.interop.Outlook这个Dll发现有很多不同的版本。
现在为了开发outlook引用了12.0这个版本,但是发现这个代码在outlook2007下
使用正常,但是outlook2003下无法正常运行。
使用的代码如下:
outlookApp = (Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Outlook.Application");
                    foreach (Explorer explore in outlookApp.Explorers)
                    {
                        outlookExplorer = explore;
                        break;
                    }
在网上查了一下好像如果要对应outlook2003,应该使用11.0这个版本。有2个问题
1,有办法使用12.0这个版本通过修改程序,保证2003和2007都可以正常运行吗?
2,现在机器上安装的都是VS2010,现在发现在Winxp下引用的时候有11.0这个版本,而在Win7下没有这个版本。这个是为什么呢?