menifest.xml-如何在上下文菜单下的办公室菜单中添加多个菜单类型控件
Excel Addin is not loading when I add multiple Menu type controls in the Office menu.
我正在使用< versionOverrides xmlns =“ http://schemas.microsoft.com/office/taskPaneAppversionOverrides” xsi:type =“ doysoverridesv1_0”>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp">
I'm using `<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">`
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp">
Menifest.xml file has below OfficeMenu config
<ExtensionPoint xsi:type="ContextMenu">
<OfficeMenu id="ContextMenuCell">
<Control xsi:type="Menu" id="TestMenu">
<Label resid="prn.TabLabel" />
<Supertip>
<Title resid="prn.TabLabel" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
</Icon>
<Items>
<Item id="contextitem1">
<Label resid="RightMenu1.TabLabel" />
<Supertip>
<Title resid="RightMenu1.TabLabel" />
<Description resid="RightMenu1.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>openTaskpaneInPopUp</FunctionName>
</Action>
</Item>
</Items>
</Control>
<Control xsi:type="Menu" id="TestMenu1">
<Label resid="prn.TabLabel" />
<Supertip>
<Title resid="prn.TabLabel" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
</Icon>
<Items>
<Item id="contextitem1">
<Label resid="RightMenu1.TabLabel" />
<Supertip>
<Title resid="RightMenu1.TabLabel" />
<Description resid="RightMenu1.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>openTaskpaneInPopUp</FunctionName>
</Action>
</Item>
</Items>
</Control>
</OfficeMenu>
</ExtensionPoint>
Excel Addin is not loading when I add multiple Menu type controls in the Office menu.
I'm using <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp">
I'm using `<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">`
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp">
Menifest.xml file has below OfficeMenu config
<ExtensionPoint xsi:type="ContextMenu">
<OfficeMenu id="ContextMenuCell">
<Control xsi:type="Menu" id="TestMenu">
<Label resid="prn.TabLabel" />
<Supertip>
<Title resid="prn.TabLabel" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
</Icon>
<Items>
<Item id="contextitem1">
<Label resid="RightMenu1.TabLabel" />
<Supertip>
<Title resid="RightMenu1.TabLabel" />
<Description resid="RightMenu1.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>openTaskpaneInPopUp</FunctionName>
</Action>
</Item>
</Items>
</Control>
<Control xsi:type="Menu" id="TestMenu1">
<Label resid="prn.TabLabel" />
<Supertip>
<Title resid="prn.TabLabel" />
<Description resid="TaskpaneButton.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
</Icon>
<Items>
<Item id="contextitem1">
<Label resid="RightMenu1.TabLabel" />
<Supertip>
<Title resid="RightMenu1.TabLabel" />
<Description resid="RightMenu1.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>openTaskpaneInPopUp</FunctionName>
</Action>
</Item>
</Items>
</Control>
</OfficeMenu>
</ExtensionPoint>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,确保功能区XML标记中使用的所有ID都是唯一的。例如,我看到以下两个控件中使用的相同ID:
默认情况下,如果DD-IN尝试操纵Microsoft Office用户界面(UI)并失败,则没有显示错误消息。但是,您可以配置Microsoft Office应用程序以显示与UI相关的错误的消息。您可以使用这些消息来帮助确定为什么未出现自定义功能区,或者为什么出现色带,但没有显示控件。请参阅如何:显示附加用户界面错误有关更多信息。
First of all, make sure that all IDs used in the ribbon XML markup is unique. For example, I see the following the same ID used in both controls:
By default, if an dd-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom ribbon does not appear, or why a ribbon appears but no controls appear. See How to: Show Add-in user interface errors for more information.