指定 addIn 在 Office 2013 中不起作用

Specify that addIn doesn't work in Office 2013

提交插件时,我们收到以下消息:

If you do not support 2013 SP1 because you are using an API only available in 2016/Online, you must put these apis in the requirements tag in your manifest.

我们的加载项在 Office 2013 中不起作用,因为它同时使用 WordApi 和 ExcelApi(在 Word 中打开时 Excel 相应地),这在 Office 2013 中不可用。

因此,我们尝试在清单文件中指定我们的插件需要 WordApi 1.1,方法是将其添加到清单文件中:

<Requirements>
   <Sets DefaultMinVersion="1.1">
      <Set Name="WordApi" MinVersion="1.1"/>
   </Sets>
</Requirements>

但是,当我们添加 WordApi 的要求时,插件不会出现在 PowerPoint 中,Excel 反之亦然。

我们如何指定 addIn 在 Office 2013 中不可用,而不必为每个 office Host 创建单独的清单文件?

如果您的清单包含 Word API(或任何特定于主机的 API),那么它将不会出现在其他客户端中。

如果您的外接程序旨在在多个客户端中工作,并且需要 API 当前不受 Office 2013 支持,请在下次提交的测试说明中包含这些详细信息。如果验证团队需要任何其他信息来解决问题,他们将通过记录在案的电子邮件地址与您联系,讨论如何进行。

看来你的标签是正确的。我没有解决方案,但也许可以尝试。我读到 Requirements Tag 的位置很重要。我把我的需求标签放在标签上面。

文章 [[=​​11=] 讨论了使用 office-toolbox 验证您的 xml 文件。您 运行 命令 "npx office-toolbox validate -m MANIFEST_FILE"(有关完整详细信息,请参阅文章)。当我 运行 我的清单上的这个验证命令有 ...

    <Sets DefaultMinVersion="1.1">
      <Set Name="ExcelApi" MinVersion="1.1"/>
    </Sets>
  </Requirements>```

It returns 

```Validation: Passed
Based on the requirements specified in your manifest, your add-in can run on the following platforms; your add-in will be tested on these platforms when you submit it to the Office Store:
  - Excel for iPad
  - Excel 2016 for Mac
  - Excel 2016 or later
  - Excel Online```

The key here being that it recognizes that it is only valid for Excel 2016. We've been using this to identify when our tags are working without having to submit to MSFT.


  [1]: https://docs.microsoft.com/en-us/office/dev/add-ins/testing/troubleshoot-manifest