与多个加载项(清单)共享自定义功能区 [英] Share custom ribbon with multiple add-ins (manifests)

查看:57
本文介绍了与多个加载项(清单)共享自定义功能区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定这是错误还是设计使然,但我正在开发两个不同的加载项(不同的清单文件),但我希望它们使用相同的自定义丝带.目前,这似乎不可能.

I'm not sure if this is a bug or by design but I have two different add-ins (different manifest files) that I'm developing but I want them to use the same custom ribbon. Currently, it doesn't seem possible.

用户应该能够执行以下操作:

The user should be able to do the following:

  1. 添加名为A1"的第一个加载项;(侧装或通过商店)

  1. Add the first add-in called "A1" (side-loaded or through store)

自定义功能区应显示为名称Awesome Stuff";它有一组特定于插件 A1 的各种命令按钮.

The Custom ribbon should appear with the name "Awesome Stuff" which has a group of various command buttons that are specific to addin A1.

用户应该在几周后返回,现在想要使用加载项A2"所以插入这个加载项(通过侧加载或办公商店).

The user should return a few weeks later and now wants to use add-in "A2" so insert this add-in (via side-loading or office store).

Office 然后会识别出 A2 的清单包含与自定义功能区相同的 ID/名称,并将 A2 的命令按钮添加到 A1 创建的相同自定义功能区中.他们将并排在不同的组下.

Office would then recognize that the manifest for A2 contains the same ID/Name for the custom ribbon and add the command buttons for A2 into the same custom ribbon created by A1. They would be side-by-side under different Groups.

观察:

在我看来,第二个加载项将创建另一个具有相同名称的选项卡,因此两个单独的清单不能共享相同的自定义功能区.

Observing:

It appears to me that the second add-in will create another tab with the same name and thus two separate manifest cannot share the same Custom Ribbon.

我所看到的截图

我使用的是最新的 Office Insiders of Excel(16.8 版本 171111).我在 Excel Online 中进行了测试,结果相同.

I'm using the latest Office Insiders of Excel (16.8 build 171111). I tested in Excel Online and same result.

  • 这是设计使然还是潜在的错误?
  • 我的清单中是否有问题或遗漏了什么?
  • 我猜标准的 excel 功能区(主要、插入等...)没有这个问题?

为什么不使用单个清单?

假设以上是设计使然...第二个加载项是第一个清单之上的附加功能.所有用户都将使用第一个加载项的功能,但只有某些用户将使用第二个加载项.如果我们将它包含在一个清单中,它会使不需要它的用户感到困惑,因此理想情况下我们希望将它们分开.

Assuming the above is by design...The second add-in is additive features on top of the first manifest. All the users will be using the features of the first add-in but only certain users will be using the second add-in. If we including it in a single manifest it will confuse users that do not need it so ideally we would like them separate.

推荐答案

目前无法实现.我建议访问 UserVoice 并将其添加为建议.

This isn't possible currently. I recommend visiting the UserVoice and adding this as a suggestion.

也就是说,这会引起一些有趣的问题.它会打开其他加载项通过插入具有相同 id 自己的命令/选项卡来意外(或恶意)破坏加载项的命令/选项卡的可能性.

That said, there are some interesting concerns this would raise. It would open up the possibility for other add-ins to accidentally (or maliciously) break your add-in's commands/tab by inserting their own commands/tab with the same id.

根据您概述的场景,更好的选择是支持在运行时更改功能区(现有 与此相关的用户语音).听起来在运行时向功能区添加或启用/禁用命令的能力将允许您在单个加载项中提供所有内容.

A better option, based on the scenario you outlined, would be to support altering the ribbon at run time (there is an existing UserVoice that speaks to this). It sounds like the ability to add or enable/disable commands to the ribbon at run-time would allow you to provide everything in a single add-in.

这篇关于与多个加载项(清单)共享自定义功能区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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