PowerPoint版本编译

发布于 2024-07-25 23:39:51 字数 282 浏览 7 评论 0原文

假设我正在使用 SharpDevelop/VS 开发一个使用 PowerPoint 的应用程序。

我是否需要重新编译应用程序,以便为每个版本的 MS Office 提供一个版本?

我有 MS Office 2007,但我还希望该应用程序能够与 Office 2003 及更高版本一起使用,而无需为每个版本重新编译该应用程序。

我是否只需要在客户端计算机上安装适当的 Office Interop 可再发行组件包/msi,然后按原样发布我的应用程序?

在此先感谢您的帮助。

Let's say I am using SharpDevelop/VS to develop an app that uses PowerPoint.

Do I need to recompile the app so there is a build for each version of MS Office?

I have MS Office 2007, but I would also like the app to work with Office 2003 and later, without having to recompile the app for each version.

Do I just need to install the appropriate Office Interop redistributable package/msi on the client machine, and ship my app as is?

Thanks in advance for your help.

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

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

发布评论

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

评论(4

若有似无的小暗淡 2024-08-01 23:39:52

我完全同意尼夫的观点。 使用你能找到的最古老的。 如果您使用 2007,它很可能无法与旧版本一起使用。

由于我不想在我的开发 PC 上安装最旧的 Office 版本,因此我使用 Virtual PC 创建“最终构建”环境。 我使用普通 PC 进行开发,然后将源文件移至安装了 Office 2003 和 VS 的虚拟 PC,并在那里创建最终的客户版本。

您将需要编辑 CSPROJ 文件以使用此方法引用旧版 Office 库。 您只需在构建虚拟 PC 上打开 VS,删除对 Office 的引用并再次添加它们即可做到这一点。

I absolutely agree with Nifle. Use the OLDEST ones you can find. If you use 2007, there is a very good chance it will not work with older versions.

Since I did not want to install the oldest Office version on my development PC, I used Virtual PC to create a "final build" environment. I develop with my regular PC then move the source files over to the Virtual PC with Office 2003 and VS installed, and create the final customer build there.

You will need to edit the CSPROJ file to reference the older Office libraries with this method. You can do that by just opening VS on the build virtual PC, removing the references to Office and adding them again.

像极了他 2024-08-01 23:39:52

只是为了向尝试此操作的任何人确认这一点。 我有一个引用 15.0 PowerPoint Interop 库和 Office 15.0 库 (Office 2013) 的 .NET 4 项目。 我将项目设置为“嵌入互操作类型”。

我设置了一个装有 Office 2007 Ultimate 的虚拟机并运行该应用程序(不复制任何其他 DLL)。 它与 PowerPoint 正确交互以提取我的应用程序正在寻找的数据。

根据我的经验,互操作库是向后兼容的。

Just to confirm this with anybody that is trying this. I have a .NET 4 project that references the 15.0 PowerPoint Interop library and the Office 15.0 library (Office 2013). I setup the project to "Embed the Interop Types".

I setup a virtual machine with Office 2007 Ultimate on and ran the application (without copying any additional DLLs). It correctly interacted with PowerPoint to extract the data my application was looking for.

The Interop libraries are backwards compatible from my experience.

灰色世界里的红玫瑰 2024-08-01 23:39:51

如果您使用的是 Microsoft.Office.Interop 库,您只需要 2007 版本,它将向后兼容旧文档

If you're using the Microsoft.Office.Interop libraries you just need the 2007 version, it will be backwards compatible with older docs

蓝天白云 2024-08-01 23:39:51

我发现您应该根据您拥有的最旧的 MS Office 进行构建。 我们仍然使用 MS Office 2000。

这背后的想法是:

  • MS Office 2000 可以做的任何事情,任何更高版本的 MS Office 都可以做到。
  • 很多事情 MS Office 2007 能做的事情是不可能的。在早期版本中执行的操作
    MS Office。

I have found that you should build against the oldest MS Office you have. We still use MS Office 2000.

The the thought behind this:

  • Everything MS Office 2000 can do any later version of MS Office can do.
  • A lot of things MS Office 2007 can do is impossible to do in earlier versions
    of MS Office.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文