menifest.xml-如何在上下文菜单下的办公室菜单中添加多个菜单类型控件

发布于 2025-01-23 19:31:08 字数 4371 浏览 2 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寄人书 2025-01-30 19:31:08

首先,确保功能区XML标记中使用的所有ID都是唯一的。例如,我看到以下两个控件中使用的相同ID:

<Item id="contextitem1">

默认情况下,如果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:

<Item id="contextitem1">

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文