Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Xml 单击Word for mac的功能区按钮时,任务窗格不会更新_Xml_Ms Word_Office Js - Fatal编程技术网

Xml 单击Word for mac的功能区按钮时,任务窗格不会更新

Xml 单击Word for mac的功能区按钮时,任务窗格不会更新,xml,ms-word,office-js,Xml,Ms Word,Office Js,我开发了一个示例Word加载项,它在功能区中有许多按钮。 单击第一个按钮,任务窗格中将显示一个HTML页面。单击任何其他按钮时,任务窗格的内容将得到更新(另一个HTML页面将被呈现) 对于旧版本的word 2016 for Mac,加载项工作正常,直到更新后我将其更新为16.9,单击任何其他功能区按钮不再更新任务窗格中的页面 我是否需要在清单中进行任何更改,以确保加载项在最新版本的word 2016 for Mac中正常工作 这是完整的清单文件 <?xml version="1.0" en

我开发了一个示例Word加载项,它在功能区中有许多按钮。 单击第一个按钮,任务窗格中将显示一个HTML页面。单击任何其他按钮时,任务窗格的内容将得到更新(另一个HTML页面将被呈现)

对于旧版本的word 2016 for Mac,加载项工作正常,直到更新后我将其更新为16.9,单击任何其他功能区按钮不再更新任务窗格中的页面

我是否需要在清单中进行任何更改,以确保加载项在最新版本的word 2016 for Mac中正常工作

这是完整的清单文件

<?xml version="1.0" encoding="utf-8"?>
<!--Published:70EDFC97-B41D-43C5-B751-7C00AD999804-->
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="TaskPaneApp">

  <!-- See https://github.com/OfficeDev/Office-Add-in-Commands-Samples for documentation-->

  <!-- BeginBasicSettings: Add-in metadata, used for all versions of Office unless override provided -->

  <!--IMPORTANT! Id must be unique for your add-in. If you clone this manifest ensure that you change this id to your own GUID -->
  <Id>13a38f35-6020-4f66-b4af-54801e25c68d</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>ProNet</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <!-- The display name of your add-in. Used on the store and various placed of the Office UI such as the add-ins dialog -->
  <DisplayName DefaultValue="RealDocs" />
  <Description DefaultValue="Click the ProNet button to get started" />
  <!--Icon for your add-in. Used on installation screens and the add-ins dialog -->
  <IconUrl DefaultValue="https://realdocs.pronetcre.com/Images/ProNet_logo.png" />

  <!--BeginTaskpaneMode integration. Office 2013 and any client that doesn't understand commands will use this section.
    This section will also be used if there are no VersionOverrides -->
  <Hosts>
    <Host Name="Document" />
  </Hosts>
  <DefaultSettings>
    <SourceLocation DefaultValue="https://realdocs.pronetcre.com/OpenLanguageLibraries.html" />
  </DefaultSettings>
  <!--EndTaskpaneMode integration -->

  <Permissions>ReadWriteDocument</Permissions>

  <!--BeginAddinCommandsMode integration-->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <!--Each host can have a different set of commands. Cool huh!? -->
      <!-- Workbook=Excel Document=Word Presentation=PowerPoint -->
      <!-- Make sure the hosts you override match the hosts declared in the top section of the manifest -->
      <Host xsi:type="Document">
        <!-- Form factor. Currenly only DesktopFormFactor is supported. We will add TabletFormFactor and PhoneFormFactor in the future-->
        <DesktopFormFactor>

          <!--GetStarted information used on the callout that appears when installing the add-in. 
            Ensure you have build 16.0.6769 or above for GetStarted section to work-->
          <GetStarted>
            <!--Title of the Getting Started callout. resid points to a ShortString resource -->
            <Title resid="Contoso.GetStarted.Title" />

            <!--Description of the Getting Started callout. resid points to a LongString resource -->
            <Description resid="Contoso.GetStarted.Description" />

            <!--Not used right now but you need to provide a valid resource. We will add code in the future to consume this URL. 
                            resid points to a Url resource -->
            <LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl" />
          </GetStarted>

          <!--Function file is an html page that includes the javascript where functions for ExecuteAction will be called. 
            Think of the FunctionFile as the "code behind" ExecuteFunction-->
          <FunctionFile resid="Contoso.FunctionFile.Url" />

          <!--PrimaryCommandSurface==Main Office Ribbon-->
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <!--Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab -->
            <!-- Documentation includes all the IDs currently tested to work -->
            <CustomTab id="Contoso.Tab1">
              <!--Group ID-->
              <Group id="Contoso.Tab1.Group1">
                <!--Label for your group. resid must point to a ShortString resource -->
                <Label resid="Contoso.Tab1.Group1Label" />
                <Icon>
                  <!-- Sample Todo: Each size needs its own icon resource or it will look distorted when resized -->
                  <!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
                  <!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
                  <bt:Image size="16" resid="Contoso.tpicon1_16x16" />
                  <bt:Image size="32" resid="Contoso.tpicon1_32x32" />
                  <bt:Image size="80" resid="Contoso.tpicon1_80x80" />
                </Icon>

                <!--Control. It can be of type "Button" or "Menu" -->
                <Control xsi:type="Button" id="Contoso.TaskpaneButton1">
                  <Label resid="Contoso.TaskpaneButton1.Label" />
                  <Supertip>
                    <Title resid="Contoso.TaskpaneButton1.Label" />
                    <Description resid="Contoso.TaskpaneButton1.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Contoso.tpicon1_16x16" />
                    <bt:Image size="32" resid="Contoso.tpicon1_32x32" />
                    <bt:Image size="80" resid="Contoso.tpicon1_80x80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>MainTaskPane</TaskpaneId>
                    <!--Provide a url resource id for the location that will be displayed on the task pane -->
                    <SourceLocation resid="Contoso.Taskpane1.Url" />
                  </Action>
                </Control>




              </Group>
              <Group id="Contoso.Tab1.Group2">
                <!--Label for your group. resid must point to a ShortString resource -->
                <Label resid="Contoso.Tab1.Group2Label" />
                <Icon>
                  <!-- Sample Todo: Each size needs its own icon resource or it will look distorted when resized -->
                  <!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
                  <!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
                  <bt:Image size="16" resid="Contoso.tpicon2_16x16" />
                  <bt:Image size="32" resid="Contoso.tpicon2_32x32" />
                  <bt:Image size="80" resid="Contoso.tpicon2_80x80" />
                </Icon>


                <Control xsi:type="Button" id="Contoso.TaskpaneButton2">
                  <!--Label for your button. resid must point to a ShortString resource -->
                  <Label resid="Contoso.TaskpaneButton2.Label" />
                  <Supertip>
                    <!--ToolTip title. resid must point to a ShortString resource -->
                    <Title resid="Contoso.TaskpaneButton2.Label" />
                    <!--ToolTip description. resid must point to a LongString resource -->
                    <Description resid="Contoso.TaskpaneButton2.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Contoso.tpicon2_16x16" />
                    <bt:Image size="32" resid="Contoso.tpicon2_32x32" />
                    <bt:Image size="80" resid="Contoso.tpicon2_80x80" />
                  </Icon>
                  <!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
                  <!--Look at the FunctionFile.html page for reference on how to implement the function -->
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>MainTaskPane</TaskpaneId>
                    <!--Provide a url resource id for the location that will be displayed on the task pane -->
                    <SourceLocation resid="Contoso.Taskpane2.Url" />
                  </Action>
                </Control>
                <Control xsi:type="Button" id="Contoso.TaskpaneButton3">
                  <!--Label for your button. resid must point to a ShortString resource -->
                  <Label resid="Contoso.TaskpaneButton3.Label" />
                  <Supertip>
                    <!--ToolTip title. resid must point to a ShortString resource -->
                    <Title resid="Contoso.TaskpaneButton3.Label" />
                    <!--ToolTip description. resid must point to a LongString resource -->
                    <Description resid="Contoso.TaskpaneButton2.Tooltip" />
                  </Supertip>
                  <Icon>
                   <bt:Image size="16" resid="Contoso.tpicon3_16x16" />
                  <bt:Image size="32" resid="Contoso.tpicon3_32x32" />
                  <bt:Image size="80" resid="Contoso.tpicon3_80x80" />
                  </Icon>
                  <!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
                  <!--Look at the FunctionFile.html page for reference on how to implement the function -->
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>MainTaskPane</TaskpaneId>
                    <!--Provide a url resource id for the location that will be displayed on the task pane -->
                    <SourceLocation resid="Contoso.Taskpane3.Url" />
                  </Action>
                </Control>
                <Control xsi:type="Button" id="Contoso.TaskpaneButton4">
                  <!--Label for your button. resid must point to a ShortString resource -->
                  <Label resid="Contoso.TaskpaneButton4.Label" />
                  <Supertip>
                    <!--ToolTip title. resid must point to a ShortString resource -->
                    <Title resid="Contoso.TaskpaneButton4.Label" />
                    <!--ToolTip description. resid must point to a LongString resource -->
                    <Description resid="Contoso.TaskpaneButton4.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Contoso.tpicon4_16x16" />
                  <bt:Image size="32" resid="Contoso.tpicon4_32x32" />
                  <bt:Image size="80" resid="Contoso.tpicon4_80x80" />
                  </Icon>
                  <!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
                  <!--Look at the FunctionFile.html page for reference on how to implement the function -->
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>MainTaskPane</TaskpaneId>
                    <!--Provide a url resource id for the location that will be displayed on the task pane -->
                    <SourceLocation resid="Contoso.Taskpane4.Url" />
                  </Action>
                </Control>

              </Group>
              <Group id="Contoso.Tab1.Group3">
                <!--Label for your group. resid must point to a ShortString resource -->
                <Label resid="Contoso.Tab1.Group3Label" />
                <Icon>
                  <!-- Sample Todo: Each size needs its own icon resource or it will look distorted when resized -->
                  <!--Icons. Required sizes 16,31,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX -->
                  <!--Use PNG icons and remember that all URLs on the resources section must use HTTPS -->
                   <bt:Image size="16" resid="Contoso.tpicon5_16x16" />
                    <bt:Image size="32" resid="Contoso.tpicon5_32x32" />
                    <bt:Image size="80" resid="Contoso.tpicon5_80x80" />
                </Icon>

                <Control xsi:type="Button" id="Contoso.TaskpaneButton5">
                  <!--Label for your button. resid must point to a ShortString resource -->
                  <Label resid="Contoso.TaskpaneButton5.Label" />
                  <Supertip>
                    <!--ToolTip title. resid must point to a ShortString resource -->
                    <Title resid="Contoso.TaskpaneButton5.Label" />
                    <!--ToolTip description. resid must point to a LongString resource -->
                    <Description resid="Contoso.TaskpaneButton5.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Contoso.tpicon5_16x16" />
                    <bt:Image size="32" resid="Contoso.tpicon5_32x32" />
                    <bt:Image size="80" resid="Contoso.tpicon5_80x80" />
                  </Icon>
                  <!--This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFuncion or ShowTaskpane-->
                  <!--Look at the FunctionFile.html page for reference on how to implement the function -->
                    <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>MainTaskPane</TaskpaneId>
                    <!--Provide a url resource id for the location that will be displayed on the task pane -->
                    <SourceLocation resid="Contoso.Taskpane5.Url" />
                  </Action>
                </Control>

              </Group>



              <!-- Label of your tab -->
              <!-- If validating with XSD it needs to be at the end, we might change this before release -->
              <Label resid="Contoso.Tab1.TabLabel" />
            </CustomTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="Contoso.tpicon1_16x16" DefaultValue="https://realdocs.pronetcre.com/Images/ProNet_logo16x16.png" />
        <bt:Image id="Contoso.tpicon1_32x32" DefaultValue="https://realdocs.pronetcre.com/Images/ProNet_logo32x32.png" />
        <bt:Image id="Contoso.tpicon1_80x80" DefaultValue="https://realdocs.pronetcre.com/Images/ProNet_logo80x80.png" />
        <bt:Image id="Contoso.tpicon2_16x16" DefaultValue="https://realdocs.pronetcre.com/Images/MyAgreements16x16.png" />
        <bt:Image id="Contoso.tpicon2_32x32" DefaultValue="https://realdocs.pronetcre.com/Images//MyAgreements32x32.png" />
        <bt:Image id="Contoso.tpicon2_80x80" DefaultValue="https://realdocs.pronetcre.com/Images//MyAgreements80x80.png" />
        <bt:Image id="Contoso.tpicon3_16x16" DefaultValue="https://realdocs.pronetcre.com/Images/CompanyAgreements16x16.png" />
        <bt:Image id="Contoso.tpicon3_32x32" DefaultValue="https://realdocs.pronetcre.com/Images/CompanyAgreements32x32.png" />
        <bt:Image id="Contoso.tpicon3_80x80" DefaultValue="https://realdocs.pronetcre.com/Images/CompanyAgreements80x80.png" />
        <bt:Image id="Contoso.tpicon4_16x16" DefaultValue="https://realdocs.pronetcre.com/Images/RealDocs16x16.png" />
        <bt:Image id="Contoso.tpicon4_32x32" DefaultValue="https://realdocs.pronetcre.com/Images/RealDocs32x32.png" />
        <bt:Image id="Contoso.tpicon4_80x80" DefaultValue="https://realdocs.pronetcre.com/Images/RealDocs80x80.png" />
        <bt:Image id="Contoso.tpicon5_16x16" DefaultValue="https://realdocs.pronetcre.com/Images/SwitchAccount16x16.png" />
        <bt:Image id="Contoso.tpicon5_32x32" DefaultValue="https://realdocs.pronetcre.com/Images/SwitchAccount32x32.png" />
        <bt:Image id="Contoso.tpicon5_80x80" DefaultValue="https://realdocs.pronetcre.com/Images/SwitchAccount80x80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Contoso.FunctionFile.Url" DefaultValue="https://realdocs.pronetcre.com/SwitchAccountFunction.html" />
      <bt:Url id="Contoso.Taskpane1.Url" DefaultValue="https://realdocs.pronetcre.com/OpenLanguageLibraries.html?Dialog=1" />
        <bt:Url id="Contoso.Taskpane2.Url" DefaultValue="https://realdocs.pronetcre.com/OpenLanguageLibraries.html?Dialog=2" />
        <bt:Url id="Contoso.Taskpane3.Url" DefaultValue="https://realdocs.pronetcre.com/OpenLanguageLibraries.html?Dialog=3" />
        <bt:Url id="Contoso.Taskpane4.Url" DefaultValue="https://realdocs.pronetcre.com/OpenLanguageLibraries.html?Dialog=4" />
        <bt:Url id="Contoso.Taskpane5.Url" DefaultValue="https://realdocs.pronetcre.com/OpenLanguageLibraries.html?Dialog=5" />

        <!--LearnMore URL currently not used -->
        <bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://commandsimple.azurewebsites.net/GetStarted.html">
        </bt:Url>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="Contoso.Tab1.TabLabel" DefaultValue="ProNet" />
        <bt:String id="Contoso.Tab1.Group1Label" DefaultValue="Language Bar" />

         <bt:String id="Contoso.Tab1.Group2Label" DefaultValue="Documents" />
         <bt:String id="Contoso.Tab1.Group3Label" DefaultValue="Group" />
        <bt:String id="Contoso.TaskpaneButton1.Label" DefaultValue="Open Language Libraries" />


        <bt:String id="Contoso.TaskpaneButton2.Label" DefaultValue="My Agreements" />
         <bt:String id="Contoso.TaskpaneButton3.Label" DefaultValue="Company Agreements" />
        <bt:String id="Contoso.TaskpaneButton4.Label" DefaultValue="RealDocs by ProNet" />
        <bt:String id="Contoso.TaskpaneButton5.Label" DefaultValue="Switch Account" />

      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="Contoso.TaskpaneButton1.Tooltip" DefaultValue="Click to open language library" />

        <bt:String id="Contoso.TaskpaneButton2.Tooltip" DefaultValue="Click to open My Agreements" />
         <bt:String id="Contoso.TaskpaneButton3.Tooltip" DefaultValue="Click to open Company Agreements" />
        <bt:String id="Contoso.TaskpaneButton4.Tooltip" DefaultValue="Click to open RealDocs by ProNet" />
        <bt:String id="Contoso.TaskpaneButton5.Tooltip" DefaultValue="Click to Switch Account" />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>

13a38f35-6020-4f66-b4af-54801e25c68d
1.0.0.0
投影网
恩美
读写文件
主任务窗格
主任务窗格
主任务窗格
主任务窗格
主任务窗格

由于您发布的XML没有包含
Contoso.Taskpane2.Url
Contoso.Taskpane3.Url
Contoso.Taskpane4.Url
的值,因此我无法肯定地回答,但根据您描述的场景,以及您在升级到16.9时观察到的这种行为变化,我怀疑您的问题可能与此处描述的问题有关:。即:

有一个变化导致Mac对应用程序域格式的要求更加严格,iOS在一段时间内也在使用同样的验证。如果删除应用程序域中的最后一个“/”字符,则导航应该可以工作


虽然这个问题是专门针对
AppDomain
URL记录的,但它似乎也适用于其他URL(尽管我不完全确定)。您的按钮URL是否恰好以
/
结尾?如果是这样,我建议您尝试从每个URL的末尾删除
/
,看看这是否解决了您的问题。

了解它的价值,我的理解是,这源于底层解析器处理URL的方式,清单中的每个URL在Mac/iOS上都具有相同的格式限制。我对所有任务窗格使用相同的任务窗格id,以便它们在同一窗口中打开,并且URL包含querystring以区分我更新文章的每个用例对于完整的清单文件,请检查它!