office-js - Word 2016 (MSO) 的 JavaScript 加载项未出现在顶部工具栏中
问题描述
我们使用 Word JavaScript API 开发了一个 Word 插件,任何在 Windows 10 上使用 Word 2016 MSO (16.0.4939.1000) 批量许可的用户都无法在顶部工具栏中看到该插件。
用户可以从 AppSource 安装加载项并启动它。但是,加载项应该出现在其自己的自定义选项卡中,但事实并非如此。用户每次启动 Word 时都必须从“我的加载项”菜单中重新添加插件。
以下是我认为是manifest.xml
文件的相关部分:
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="WordApi" MinVersion="1.1" />
</Sets>
</Requirements>
<CustomTab id="TabXX">
<Group id="XX.Group1">
<Label resid="XX.Group1Label" />
<Icon>
<!-- Images removed for simplicity -->
</Icon>
<Control xsi:type="Button" id="XX.TaskpaneButton">
<Label resid="XX.TaskpaneButton.Label" />
<Supertip>
<Title resid="XX.TaskpaneButton.Label" />
<Description resid="XX.TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<!-- Images removed for simplicity -->
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>XXPanel</TaskpaneId>
<SourceLocation resid="XX.Taskpane.Url" />
</Action>
</Control>
<Control xsi:type="Button" id="XX.SignOutButton">
<Label resid="XX.SignOutButton.Label" />
<Supertip>
<Title resid="XX.SignOutButton.Label" />
<Description resid="XX.SignOutButton.Tooltip" />
</Supertip>
<Icon>
<!-- Images removed for simplicity -->
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>logout</FunctionName>
</Action>
</Control>
</Group>
<Label resid="XX.CustomTab.Label" />
</CustomTab>
<Resources>
<bt:Images>
<!-- Images removed for simplicity -->
</bt:Images>
<bt:Urls>
<bt:Url id="XX.Taskpane.Url" DefaultValue="https://wordapp.xx.com/index.html?v=1.0.0.0" />
<bt:Url id="XX.SignOutButton.Url" DefaultValue="https://wordapp.xx.com/#/app/logout" />
<bt:Url id="XX.GetStarted.LearnMoreUrl" DefaultValue="https://www.xx.com/" />
<bt:Url id="XX.FunctionFile.Url" DefaultValue="https://wordapp.xx.com/function-file/function-file.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="XX.TaskpaneButton.Label" DefaultValue="XX" />
<bt:String id="XX.Group1Label" DefaultValue="ThoughtRiver" />
<bt:String id="XX.CustomTab.Label" DefaultValue="XX" />
<bt:String id="XX.GetStarted.Title" DefaultValue="Get started with XX!" />
<bt:String id="XX.SignOutButton.Label" DefaultValue="Sign out" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="XX.TaskpaneButton.Tooltip" DefaultValue="Click to load the add-in" />
<bt:String id="XX.GetStarted.Description" DefaultValue="The add-in was loaded successfully. Go to the XX tab and click the 'Show Taskpane' button to get started." />
<bt:String id="XX.SignOutButton.Tooltip" DefaultValue="Click to Sign Out" />
</bt:LongStrings>
</Resources>
上面的配置有什么问题吗?
Word 2016 的批量许可中的 AppSource 商店中的加载项是否支持自定义选项卡(我知道 COM 加载项支持它们)?
是否支持将加载项添加到现有选项卡?
提前致谢,
摩根
解决方案
word 2016 不支持加载项命令。
您可以使用 isSetSupport 检查加载项命令要求集。如果不支持,请在任务窗格上创建相关按钮作为解决方法
推荐阅读
- blazor - 如何添加 SVG
在 Blazor/razor 文件中 - python - 抓取长度为 6 的数字,Python 中特定短语后面的数字除外
- php - 从 WooCommerce 中的管理产品设置和单个产品页面中删除“重量”
- python - Python中是否有一种方法可以从字符串中读取两个浮点数
- javascript - 尝试将简单点插入地理服务器点图层时出错
- kubernetes - 使用 API 调用检索 GKE 集群 kubeconfig
- python - 在 Pandas 中排名 OVER Window PartitionBy
- python - 绘制子图时如何修复“numpy.ndarray”对象没有属性“get_figure”
- javascript - 获取正确的每小时块
- html - 使用通配符 CSS 选择器