与多个加载项(清单)共享自定义功能区

编程入门 行业动态 更新时间:2024-10-08 10:49:58
本文介绍了与多个加载项(清单)共享自定义功能区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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:

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

  • 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.

  • 更多推荐

    与多个加载项(清单)共享自定义功能区

    本文发布于:2023-10-31 10:27:39,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1545811.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:多个   自定义   清单   加载   功能

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!