仅安装 Office 2010 的 Office 2003 互操作

发布于 2024-09-23 23:50:54 字数 272 浏览 4 评论 0原文

我们有一个使用 Outlook 2003 功能(Microsoft Office 11.0 对象库)的应用程序 (.NET 2.0)。我的新计算机安装了 Windows 7 和 Office 2010,并且引用不再起作用(只有 Office 14 对象库可用)。

有没有办法在安装Office 2010时使用Office 2003 dll(我听说2003和2010不能安装在同一台机器上)?我尝试为 Office 2003 安装“可再发行主互操作程序集”,但如果没有安装 Office 2003,则无法执行此操作。

We have an application (.NET 2.0) that uses Outlook 2003 features (Microsoft Office 11.0 Object Library). My new computer has Windows 7 and Office 2010 installed, and the references don't work anymore (there's only Office 14 Object Library available).

Is there any way to use Office 2003 dlls when Office 2010 is installed (I've heard that 2003 and 2010 cannot be installed on the same machine)? I've tried to install the "Redistributable Primary Interop Assemblies" for Office 2003, but couldn't do it without installed Office 2003.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

惟欲睡 2024-09-30 23:50:54

使用后期绑定,而不是引用特定版本的库。这样您就可以针对一个版本进行开发,但只要您坚持使用通用功能,它也可以在其他版本中使用。

本文解释了差异 使用 Visual C# .NET 绑定 Office 自动化服务器

它可以更容易做到使用早期绑定进行开发,以便您获得 Intellisense,然后稍后删除引用(这将需要一些时间。是否值得,这在一定程度上取决于您的 Office 开发技能水平。

Rather that referencing a specific version of the libraries, use late binding. That way you can develop against one version, but as long as you stick to using common functionality it'll work in other versions as well.

This article explains the difference Binding for Office automation servers with Visual C# .NET

It can be easier to do the development using early binding so that you get Intellisense and then removing the references later on (which will take a little time. If it's worth itdepends a bit on your skill level with Office development.

若能看破又如何 2024-09-30 23:50:54

我怀疑 kor_ 是否仍然遇到这个问题,但我很难找到有关此问题的帮助。

我遇到了类似的问题,经过多次搜索后找到了 NetOffice。它是 COM 对象的包装器,因此您无需更改代码即可获得后期绑定兼容性。

我相信PIA仍然需要用户与office一起安装。

http://netoffice.codeplex.com/

I doubt kor_ is still having this issue, but I had a hard time finding help on this one.

I was having a similar issue and found NetOffice after much searching. It's a wrapper for the COM object so that you can get late-binding compatibility without having to change your code.

I believe the PIAs still need to be installed by the user along with office.

http://netoffice.codeplex.com/

过潦 2024-09-30 23:50:54

通过后期绑定,您可以删除对 Office Interop dll 的任何引用。
我们和你有同样的问题,这有效:

Dim OutlApp As Object
Dim NewEmail As Object

OutlApp = CreateObject("Outlook.Application")
NewEmail = OutlApp.CreateItem(0) 

With late binding you can remove any reference to Office Interop dll's.
We have the same issue as you and this works:

Dim OutlApp As Object
Dim NewEmail As Object

OutlApp = CreateObject("Outlook.Application")
NewEmail = OutlApp.CreateItem(0) 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文