VSTO插件兼容哪些Word版本?

huangapple go评论95阅读模式
英文:

With which word versions is a VSTO Plugin compatible?

问题

我已经为Microsoft Word开发了一个VSTO插件。现在我想检查这个插件与Word的兼容性。我该如何找出我的插件与哪些Word版本兼容?

谢谢和问候。

英文:

I have developed a VSTO Plugin for Microsoft Word. Now I want to check the compatibility of this plugin with Word. How can I find out, with which Word versions my Plugin is compatible with?

Thank and regards

答案1

得分: 1

  1. VSTO插件的情况有几个方面:

    • VSTO运行时。COM插件可在Word 2000及以上版本中运行。要确定您的插件与哪些Word版本兼容,您需要查看VSTO支持的范围。当然,这取决于.NET运行时版本,但在不同版本的Microsoft Office中运行解决方案页面列出了根据VSTO版本和目标.NET框架使用的受支持的Office版本。
  2. Word对象模型。对于宿主应用程序,您需要审查您的代码并检查使用了哪些属性和方法。通常,最低受支持的版本对应于您在解决方案中使用的Word互操作版本。如果尝试在较早的Word版本中运行解决方案,存在调用稍后版本中引入的属性或方法的可能性。

  3. 安装程序。在您的安装程序中,您可以配置最低所需版本。根据这一版本,您可以确定Word的受支持版本。

英文:

There are several aspects in case of VSTO add-ins:

  1. The VSTO runtime. COM add-ins can be run in Word 2000 and above. To find out with what Word versions your add-in is compatible you need to check where VSTO is supported. It depends on the .net runtime version of course, but the Run solutions in different versions of Microsoft Office page lists supported Office versions depending on the VSTO version and target .net framework used.

  2. The Word object model. As for the host application, you need to review your code and check what properties and methods are used. Typically the minimum supported version corresponds to the Word interop version you have used in your solution. If you try to run your solution in an earlier Word version there is a chance to call a property or method which was introduced in later versions.

  3. The installer. In your installer you may configure the minimum required version. Depending on that you may figure out the supported versions of Word.

答案2

得分: 0

它将与您在项目引用中添加的 Word 版本兼容。如果避免使用较新版本的特定功能,它也很可能能够在较旧的版本上正常运行。

如果您希望支持特定的最低版本,请在已安装该版本的计算机上创建一个互操作 DLL,然后将该互操作 DLL 添加到您的 VSTO 插件项目的引用中,而不是从 COM 选项卡添加 Word 对象模型库。

英文:

It will be compatible with at least the version of Word that you added as a reference to your project references. It will also likely work fine with the previous versions if you avoid using newer-version specific features.

If you have a particular minimum version that you want to support, create an interop dll on a machine where that version is installed and then add that interop dll to your VSTO addin project references instead of adding Word Object Model library from the COM tab.

huangapple
  • 本文由 发表于 2023年3月7日 22:49:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/75663498.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定