Outlook 加载项未在 2016 中呈现

Outlook Add-in not rendering in 2016

我正在创建一个 Outlook 加载项,它在 Outlook 2013 中运行良好。但是在 Outlook 2016 中,没有显示任何内容。丝带物品完全消失了。 2013 年出现了三个功能区按钮,2016 年没有。

知道清单文件中可能有什么问题。

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides"
    xsi:type="MailApp">
  <Id>3a2be270-ea2f-407c-97f1-138f67352cb4</Id>
  <Version>1.1.9</Version>
  <ProviderName>--REMOVED--</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="--REMOVED-- for PS"/>
  <Description DefaultValue="[Outlook Add-in description]"/>
  <IconUrl DefaultValue="https://localhost/--REMOVED--PS/outlook/images/icon-32.png"/>
  <HighResolutionIconUrl DefaultValue="https://localhost/--REMOVED--PS/outlook/images/icon-80.png"/>
  <SupportUrl DefaultValue="https://help.--REMOVED--.com/Product/--REMOVED--PS/"/>
  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="MailBox" MinVersion="1.1"/>
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="https://localhost/--REMOVED--PS/outlook/appread/home/home.html"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadItem</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/>
  </Rule>
  <DisableEntityHighlighting>false</DisableEntityHighlighting>
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="funcFile"/>

          <ExtensionPoint xsi:type="MessageReadCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="msgReadCmdGroup">
                <Label resid="groupLabel"/>
                <Control xsi:type="Button" id="msgReadPaneButton">
                  <Label resid="msgReadPaneButtonLabel"/>
                  <Supertip>
                    <Title resid="msgReadPaneButtonTitle"/>
                    <Description resid="msgReadPaneButtonDesc"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="--REMOVED---16"/>
                    <bt:Image size="32" resid="--REMOVED---32"/>
                    <bt:Image size="80" resid="--REMOVED---80"/>
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="readPaneUrl"/>
                  </Action>
                </Control>
                <Control xsi:type="Menu" id="msgCreateMenu">
                  <Label resid="menuCreateLabel"/>
                  <Supertip>
                    <Title resid="menuCreateTitle"/>
                    <Description resid="menuCreateDescription"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="new-16"/>
                    <bt:Image size="32" resid="new-32"/>
                    <bt:Image size="80" resid="new-80"/>
                  </Icon>
                  <Items>
                    <Item id="msgCreateContact">
                      <Label resid="createContactLabel"/>
                      <Supertip>
                        <Title resid="createContactTitle"/>
                        <Description resid="createContactDesc"/>
                      </Supertip>
                      <Icon>
                        <bt:Image size="16" resid="contact-16"/>
                        <bt:Image size="32" resid="contact-32"/>
                        <bt:Image size="80" resid="contact-80"/>
                      </Icon>
                      <Action xsi:type="ExecuteFunction">
                        <FunctionName>createContact</FunctionName>
                      </Action>
                    </Item>
                    <Item id="msgCreateFirm">
                      <Label resid="createFirmLabel"/>
                      <Supertip>
                        <Title resid="createFirmTitle"/>
                        <Description resid="createFirmDesc"/>
                      </Supertip>
                      <Icon>
                        <bt:Image size="16" resid="firm-16"/>
                        <bt:Image size="32" resid="firm-32"/>
                        <bt:Image size="80" resid="firm-80"/>
                      </Icon>
                      <Action xsi:type="ExecuteFunction">
                        <FunctionName>createFirm</FunctionName>
                      </Action>
                    </Item>
                    <Item id="msgCreateOpportunity">
                      <Label resid="createOpportunityLabel"/>
                      <Supertip>
                        <Title resid="createOpportunityTitle"/>
                        <Description resid="createOpportunityDesc"/>
                      </Supertip>
                      <Icon>
                        <bt:Image size="16" resid="opportunity-16"/>
                        <bt:Image size="32" resid="opportunity-32"/>
                        <bt:Image size="80" resid="opportunity-80"/>
                      </Icon>
                      <Action xsi:type="ExecuteFunction">
                        <FunctionName>createOpportunity</FunctionName>
                      </Action>
                    </Item>
                    <Item id="msgCreateActivity">
                      <Label resid="createActivityLabel"/>
                      <Supertip>
                        <Title resid="createActivityTitle"/>
                        <Description resid="createActivityDesc"/>
                      </Supertip>
                      <Icon>
                        <bt:Image size="16" resid="activity-16"/>
                        <bt:Image size="32" resid="activity-32"/>
                        <bt:Image size="80" resid="activity-80"/>
                      </Icon>
                      <Action xsi:type="ExecuteFunction">
                        <FunctionName>createActivity</FunctionName>
                      </Action>
                    </Item>
                  </Items>
                </Control>
                <Control xsi:type="Menu" id="msgSetttingHelpMenu">
                  <Label resid="menuSettingsHelpLabel"/>
                  <Supertip>
                    <Title resid="menuSettingsHelpTitle"/>
                    <Description resid="menuSettingsHelpDescription"/>
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="settings-16"/>
                    <bt:Image size="32" resid="settings-32"/>
                    <bt:Image size="80" resid="settings-80"/>
                  </Icon>
                  <Items>
                    <Item id="msgCheckAccountInformation">
                      <Label resid="checkAccountInformationLabel"/>
                      <Supertip>
                        <Title resid="checkAccountInformationTitle"/>
                        <Description resid="checkAccountInformationDesc"/>
                      </Supertip>
                      <Action xsi:type="ShowTaskpane">
                        <SourceLocation resid="settingsPaneUrl"/>
                      </Action>
                    </Item>
                    <Item id="msgCheckHelp">
                      <Label resid="checkHelpLabel"/>
                      <Supertip>
                        <Title resid="checkHelpTitle"/>
                        <Description resid="checkHelpDesc"/>
                      </Supertip>
                      <Action xsi:type="ExecuteFunction">
                        <FunctionName>checkHelp</FunctionName>
                      </Action>
                    </Item>
                  </Items>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>

        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>
      <bt:Images>
        <bt:Image id="--REMOVED---16" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/--REMOVED---16.png"/>
        <bt:Image id="--REMOVED---32" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/--REMOVED---32.png"/>
        <bt:Image id="--REMOVED---80" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/--REMOVED---80.png"/>
        <bt:Image id="new-16" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/new-16.png"/>
        <bt:Image id="new-32" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/new-32.png"/>
        <bt:Image id="new-80" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/new-80.png"/>
        <bt:Image id="settings-16" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/settings-16.png"/>
        <bt:Image id="settings-32" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/settings-32.png"/>
        <bt:Image id="settings-80" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/settings-80.png"/>
        <bt:Image id="activity-16" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/activity-16.png"/>
        <bt:Image id="activity-32" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/activity-32.png"/>
        <bt:Image id="activity-80" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/activity-80.png"/>
        <bt:Image id="contact-16" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/contact-16.png"/>
        <bt:Image id="contact-32" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/contact-32.png"/>
        <bt:Image id="contact-80" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/contact-80.png"/>
        <bt:Image id="firm-16" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/firms-16.png"/>
        <bt:Image id="firm-32" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/firms-32.png"/>
        <bt:Image id="firm-80" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/firms-80.png"/>
        <bt:Image id="opportunity-16" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/opportunity-16.png"/>
        <bt:Image id="opportunity-32" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/opportunity-32.png"/>
        <bt:Image id="opportunity-80" DefaultValue="https://localhost/--REMOVED--PS/outlook/images/opportunity-80.png"/>
      </bt:Images>
      <bt:Urls>
        <bt:Url id="funcFile" DefaultValue="https://localhost/--REMOVED--PS/outlook/appread/home/Functions.html"/>
        <bt:Url id="readPaneUrl" DefaultValue="https://localhost/--REMOVED--PS/outlook/appread/home/home.html"/>
        <bt:Url id="settingsPaneUrl" DefaultValue="https://localhost/--REMOVED--PS/outlook/appread/home/home.html?pane=Settings"/>
      </bt:Urls>
      <bt:ShortStrings>
        <bt:String id="groupLabel" DefaultValue="--REMOVED--"/>
        <bt:String id="msgReadPaneButtonLabel" DefaultValue="Open --REMOVED--"/>
        <bt:String id="menuCreateLabel" DefaultValue="Create New"/>
        <bt:String id="menuSettingsHelpLabel" DefaultValue="Settings and Help"/>
        <bt:String id="createContactLabel" DefaultValue="Contact"/>
        <bt:String id="createFirmLabel" DefaultValue="Firm"/>
        <bt:String id="createOpportunityLabel" DefaultValue="Opportunity"/>
        <bt:String id="createActivityLabel" DefaultValue="Activity"/>
        <bt:String id="checkAccountInformationLabel" DefaultValue="Account Information"/>
        <bt:String id="checkHelpLabel" DefaultValue="Help"/>
        <bt:String id="msgReadPaneButtonTitle" DefaultValue="--REMOVED--"/>
        <bt:String id="menuCreateTitle" DefaultValue="Create New"/>
        <bt:String id="createOpportunityTitle" DefaultValue="Create New Opportunity"/>
        <bt:String id="checkHelpTitle" DefaultValue="Help"/>
        <bt:String id="checkAccountInformationTitle" DefaultValue="Account Information"/>
        <bt:String id="createActivityTitle" DefaultValue="Create New Activity"/>
        <bt:String id="createFirmTitle" DefaultValue="Create New Firm"/>
        <bt:String id="menuSettingsHelpTitle" DefaultValue="Settings and Help"/>
        <bt:String id="createContactTitle" DefaultValue="Create New Contact"/>
      </bt:ShortStrings>
      <bt:LongStrings>
        <bt:String id="msgReadPaneButtonDesc" DefaultValue="Opens a task pane showing information about the contacts"/>
        <bt:String id="checkAccountInformationDesc" DefaultValue="Update your account information for --REMOVED-- for Professional Services"/>
        <bt:String id="createContactDesc" DefaultValue="Open --REMOVED-- for Professional Services to create a new Contact"/>
        <bt:String id="createFirmDesc" DefaultValue="Open --REMOVED-- for Professional Services to create a new Firm"/>
        <bt:String id="createOpportunityDesc" DefaultValue="Open --REMOVED-- for Professional Services to create a new Opportunity"/>
        <bt:String id="createActivityDesc" DefaultValue="Open --REMOVED-- for Professional Services to create a new Activity"/>
        <bt:String id="checkHelpDesc" DefaultValue="Open --REMOVED-- for Professional Services to check the help interface"/>
        <bt:String id="menuCreateDescription" DefaultValue="Create a new Contact, Firm, Opportunity or Activity in --REMOVED-- for Professional Services."/>
        <bt:String id="menuSettingsHelpDescription" DefaultValue="Update your account information or access help."/>
      </bt:LongStrings>
    </Resources>
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
      <Hosts>
        <Host xsi:type="MailHost">
          <DesktopFormFactor>
            <FunctionFile resid="funcFile"/>

            <ExtensionPoint xsi:type="MessageReadCommandSurface">
              <OfficeTab id="TabDefault">
                <Group id="msgReadCmdGroup">
                  <Label resid="groupLabel"/>
                  <Control xsi:type="Button" id="msgReadPaneButton">
                    <Label resid="msgReadPaneButtonLabel"/>
                    <Supertip>
                      <Title resid="msgReadPaneButtonTitle"/>
                      <Description resid="msgReadPaneButtonDesc"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="--REMOVED---16"/>
                      <bt:Image size="32" resid="--REMOVED---32"/>
                      <bt:Image size="80" resid="--REMOVED---80"/>
                    </Icon>
                    <Action xsi:type="ShowTaskpane">
                      <SourceLocation resid="readPaneUrl"/>
                      <SupportsPinning>true</SupportsPinning>
                    </Action>
                  </Control>
                  <Control xsi:type="Menu" id="msgCreateMenu">
                    <Label resid="menuCreateLabel"/>
                    <Supertip>
                      <Title resid="menuCreateTitle"/>
                      <Description resid="menuCreateDescription"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="new-16"/>
                      <bt:Image size="32" resid="new-32"/>
                      <bt:Image size="80" resid="new-80"/>
                    </Icon>
                    <Items>
                      <Item id="msgCreateContact">
                        <Label resid="createContactLabel"/>
                        <Supertip>
                          <Title resid="createContactTitle"/>
                          <Description resid="createContactDesc"/>
                        </Supertip>
                        <Icon>
                          <bt:Image size="16" resid="contact-16"/>
                          <bt:Image size="32" resid="contact-32"/>
                          <bt:Image size="80" resid="contact-80"/>
                        </Icon>
                        <Action xsi:type="ExecuteFunction">
                          <FunctionName>createContact</FunctionName>
                        </Action>
                      </Item>
                      <Item id="msgCreateFirm">
                        <Label resid="createFirmLabel"/>
                        <Supertip>
                          <Title resid="createFirmTitle"/>
                          <Description resid="createFirmDesc"/>
                        </Supertip>
                        <Icon>
                          <bt:Image size="16" resid="firm-16"/>
                          <bt:Image size="32" resid="firm-32"/>
                          <bt:Image size="80" resid="firm-80"/>
                        </Icon>
                        <Action xsi:type="ExecuteFunction">
                          <FunctionName>createFirm</FunctionName>
                        </Action>
                      </Item>
                      <Item id="msgCreateOpportunity">
                        <Label resid="createOpportunityLabel"/>
                        <Supertip>
                          <Title resid="createOpportunityTitle"/>
                          <Description resid="createOpportunityDesc"/>
                        </Supertip>
                        <Icon>
                          <bt:Image size="16" resid="opportunity-16"/>
                          <bt:Image size="32" resid="opportunity-32"/>
                          <bt:Image size="80" resid="opportunity-80"/>
                        </Icon>
                        <Action xsi:type="ExecuteFunction">
                          <FunctionName>createOpportunity</FunctionName>
                        </Action>
                      </Item>
                      <Item id="msgCreateActivity">
                        <Label resid="createActivityLabel"/>
                        <Supertip>
                          <Title resid="createActivityTitle"/>
                          <Description resid="createActivityDesc"/>
                        </Supertip>
                        <Icon>
                          <bt:Image size="16" resid="activity-16"/>
                          <bt:Image size="32" resid="activity-32"/>
                          <bt:Image size="80" resid="activity-80"/>
                        </Icon>
                        <Action xsi:type="ExecuteFunction">
                          <FunctionName>createActivity</FunctionName>
                        </Action>
                      </Item>
                    </Items>
                  </Control>
                  <Control xsi:type="Menu" id="msgSetttingHelpMenu">
                    <Label resid="menuSettingsHelpLabel"/>
                    <Supertip>
                      <Title resid="menuSettingsHelpTitle"/>
                      <Description resid="menuSettingsHelpDescription"/>
                    </Supertip>
                    <Icon>
                      <bt:Image size="16" resid="settings-16"/>
                      <bt:Image size="32" resid="settings-32"/>
                      <bt:Image size="80" resid="settings-80"/>
                    </Icon>
                    <Items>
                      <Item id="msgCheckAccountInformation">
                        <Label resid="checkAccountInformationLabel"/>
                        <Supertip>
                          <Title resid="checkAccountInformationTitle"/>
                          <Description resid="checkAccountInformationDesc"/>
                        </Supertip>
                        <Action xsi:type="ShowTaskpane">
                          <SourceLocation resid="settingsPaneUrl"/>
                          <SupportsPinning>true</SupportsPinning>
                        </Action>
                      </Item>
                      <Item id="msgCheckHelp">
                        <Label resid="checkHelpLabel"/>
                        <Supertip>
                          <Title resid="checkHelpTitle"/>
                          <Description resid="checkHelpDesc"/>
                        </Supertip>
                        <Action xsi:type="ExecuteFunction">
                          <FunctionName>checkHelp</FunctionName>
                        </Action>
                      </Item>
                    </Items>
                  </Control>
                </Group>
              </OfficeTab>
            </ExtensionPoint>

          </DesktopFormFactor>
        </Host>
      </Hosts>
    </VersionOverrides>
  </VersionOverrides>
</OfficeApp>

<Supertip>标签内有<Title><Description><Title> 资源必须放入 <bt:ShortStrings> parent 标记中。同时 <Description> 资源必须放入 <bt:LongStrings> parent 标签。

Office Add-ins XML manifest 上的文档说明如下:

  • 标题:必填。超级提示的文本。 resid 属性必须设置为 String 元素的 id 属性的值。 String 元素是 ShortStrings 元素的 child 元素,后者是 Resources 元素的 child 元素。
  • 说明:必需。超级提示的描述。 resid 属性必须设置为 String 元素的 id 属性的值。 String 元素是 LongStrings 元素的 child 元素,而 LongStrings 元素是 Resources 元素的 child 元素。

为了修复您的清单,我已将以下资源 ID 移至 <bt:ShortStrings> ...

<bt:ShortStrings>
    <bt:String id="groupLabel" DefaultValue="--REMOVED--"/>
    <bt:String id="msgReadPaneButtonLabel" DefaultValue="Open --REMOVED--"/>
    <bt:String id="menuCreateLabel" DefaultValue="Create New"/>
    <bt:String id="menuSettingsHelpLabel" DefaultValue="Settings and Help"/>
    <bt:String id="createContactLabel" DefaultValue="Contact"/>
    <bt:String id="createFirmLabel" DefaultValue="Firm"/>
    <bt:String id="createOpportunityLabel" DefaultValue="Opportunity"/>
    <bt:String id="createActivityLabel" DefaultValue="Activity"/>
    <bt:String id="checkAccountInformationLabel" DefaultValue="Account Information"/>
    <bt:String id="checkHelpLabel" DefaultValue="Help"/>
    <bt:String id="msgReadPaneButtonTitle" DefaultValue="--REMOVED--"/>
    <bt:String id="menuCreateTitle" DefaultValue="Create New"/>
    <bt:String id="createOpportunityTitle" DefaultValue="Create New Opportunity"/>
    <bt:String id="checkHelpTitle" DefaultValue="Help"/>
    <bt:String id="checkAccountInformationTitle" DefaultValue="Account Information"/>
    <bt:String id="createActivityTitle" DefaultValue="Create New Activity"/>
    <bt:String id="createFirmTitle" DefaultValue="Create New Firm"/>
    <bt:String id="menuSettingsHelpTitle" DefaultValue="Settings and Help"/>
    <bt:String id="createContactTitle" DefaultValue="Create New Contact"/>
  </bt:ShortStrings>

编辑:

这变成了 "remote debugging" 而不是 QandA,但我已经完成了。在仔细查看您的清单并将所有图像条目替换为我自己的之后,我意识到您缺少 <VersionOverrides> 元素中的整个 <Resources> 部分。您必须在 VersionOverrides 元素中包含此标记。只要我添加 add-in 部分就会出现在 Outlook 桌面中。请注意,VersionOverrides 元素中的资源字符串将覆盖 parent 元素中的相同字符串。