支持多种办公版本 [英] Supporting multiple office versions

查看:120
本文介绍了支持多种办公版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在.NET中的一个项目上工作,这是Office的一个插件.问题在于该解决方案需要编译Office 2003、2007和2010的加载项,同时在它们之间共享相同的业务逻辑.
什么是最好的方法来完成此任务,并且仍然具有可维护的解决方案?理想情况下,我不想针对不同的Office版本使用不同的开发机器,而只使用Visual Studio(2010)的一个版本.

I am working on a project in .Net which is an addin to office. The issue is that the solution needs to compile addins for Office 2003, 2007 and 2010 while sharing the same business logic between these.
What is the best way to accomplish this and still have a maintainable solution? Ideally I would like to NOT use different development machines for the various office versions, and use only one version of Visual Studio (2010).

推荐答案

很长一段时间以前,在一个遥远的星系中,我认为我们可以通过查看安装了哪个办公室的注册表来解决此问题,并绑定相应的对象并以这种方式调用方法.不过,您将需要进行彻底的测试,因为并非所有方法和对象在版本之间都是相同的.

我建议通过编写快速而肮脏的测试应用程序来开始使用不同版本进行测试,然后再针对实际应用程序进行良好的设计.

希望对您有所帮助.
A long, long time ago, in a galaxy far, far away I think we solved that by looking into the registry which office was installed, bind the corresponding object and call the methods that way. You''ll need to test this thouroughly though, because not all methods and objects will be the same between versions.

I propose to start testing with different versions by writing quick and dirty test applications and then move on to a good design for the real application.

hope this helps.


这篇关于支持多种办公版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆