1

我正在使用以下清单在 Outlook 2016 中添加插件命令。

<?xml version="1.0" encoding="utf-8"?>
<OfficeApp xsi:type="MailApp" 
             xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" 
   xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/office/appforoffice/1.1">
  <Id></Id>
  <Version>1.0.0.0</Version>
  <ProviderName></ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="" />
  <Description DefaultValue="" />
  <SupportUrl DefaultValue="" />
  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="MailBox" MinVersion="1.1" />
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="~remoteAppUrl/AppRead/Home/home.html" />
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
      <TabletSettings>
        <SourceLocation DefaultValue="~remoteAppUrl/AppRead/Home/home.html" />
        <RequestedHeight>250</RequestedHeight>
      </TabletSettings>
      <PhoneSettings>
        <SourceLocation DefaultValue="~remoteAppUrl/AppRead/Home/home.html" />
      </PhoneSettings>
    </Form>
    <Form xsi:type="ItemEdit">
      <DesktopSettings>
        <SourceLocation DefaultValue="~remoteAppUrl/AppRead/Home/home.html" />
      </DesktopSettings>
      <TabletSettings>
        <SourceLocation DefaultValue="~remoteAppUrl/AppRead/Home/home.html" />
      </TabletSettings>
      <PhoneSettings>
        <SourceLocation DefaultValue="~remoteAppUrl/AppRead/Home/home.html" />
      </PhoneSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadWriteMailbox</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="ReadOrEdit" />
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" />
    <Rule xsi:type="ItemIs" ItemType="Appointment" FormType="ReadOrEdit" />
  </Rule>



 <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
    <Description resid="residDescription" />
    <Requirements>
      <bt:Sets DefaultMinVersion="1.3">
        <bt:Set Name="Mailbox" />
      </bt:Sets>
    </Requirements>
    <Hosts>
      <Host xsi:type="MailHost">
        <DesktopFormFactor>
          <FunctionFile resid="residDesktopFuncUrl" />
       
          <ExtensionPoint xsi:type="MessageComposeCommandSurface">
            <OfficeTab id="TabDefault">
              <Group id="msgreadTabMessage.grp1">
                <Label resid="residTemplateManagement" />
                <Tooltip resid="residTemplateManagementTip" />
                <Control xsi:type="Button" id="msgreadTabMessage.grp1.btnView">
                  <Label resid="residViewTemplates" />
                  <Tooltip resid="residViewTemplatesTip" />
                  <Supertip>
                    <Title resid="residVewAndManageTemplates" />
                    <Description resid="residViewManageTemplatesSprTip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="icon1_16x16" />
                    <bt:Image size="32" resid="icon1_32x32" />
                    <bt:Image size="80" resid="icon1_80x80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <SourceLocation resid="residManageTemplatesUrl" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        
        </DesktopFormFactor>
      </Host>
    </Hosts>

  <Resources>
    <bt:Images>
      <bt:Image id="icon1_16x16" DefaultValue="https://contoso.com/owa/images/app_icon_small.png" >
 
      </bt:Image>
      <bt:Image id="icon1_32x32" DefaultValue="https://contoso.com/owa/images/app_icon.png" >

      </bt:Image>
      <bt:Image id="icon1_80x80" DefaultValue="https://contoso.com/owa/images/app_icon_large.png" >

      </bt:Image>
    </bt:Images>
    <bt:Urls>
      <bt:Url id="residDesktopFuncUrl" DefaultValue="~remoteAppUrl/AppRead/Home/home.html" >

      </bt:Url>
      <bt:Url id="residManageTemplatesUrl" DefaultValue="~remoteAppUrl/AppRead/Home/home.html">
      </bt:Url>
      <bt:Url id="residAddNewTemplateUrl" DefaultValue="~remoteAppUrl/AppRead/Home/home.html">

      </bt:Url>

    </bt:Urls>
    <bt:ShortStrings>
      <bt:String id="residTemplateManagement" DefaultValue="Do.com">

      </bt:String>
      <bt:String id="residViewTemplates" DefaultValue="Launch Do.com">

      </bt:String>
      <bt:String id="residVewAndManageTemplates" DefaultValue="View and Manage Templates">

      </bt:String>
 
    </bt:ShortStrings>
    <bt:LongStrings>
      <bt:String id="residDescription" DefaultValue="Use this app to automatically scan outgoing mails and insert content according to customizable mark-up. This app will not share your data with any third-party service.">
       
      </bt:String>
      <bt:String id="residTemplateManagementTip" DefaultValue="Operations for managing your template collection">
            </bt:String>
      <bt:String id="residViewTemplatesTip" DefaultValue="Open a taskpane to display and manage your current templates">
            </bt:String>
      <bt:String id="residViewManageTemplatesSprTip" DefaultValue="Open a taskpane that will display all templates saved under your profile and default templates provided by the service. From this pane you can add, remove, or change template properties.">
            </bt:String>
      <bt:String id="residMyTemplatesTabTip" DefaultValue="Insert content from a saved collection of prepared data, or embed tags into your mail that are automatically replaced on send!">
            </bt:String>
    </bt:LongStrings>
  </Resources>
  </VersionOverrides>
  
  
  
  
</OfficeApp>

但是该按钮没有添加到功能区中。如果我删除“VersionOverrides”,则插件将显示在 Outlook 2016 中。

因此,VersionOverrides 正在工作,但不知何故,该按钮在读取期间并没有显示在邮件中,也没有显示在撰写模式下的插件列表中。我错过了什么?

4

2 回答 2

1

清单中的 URL 必须是可访问的。您有很多以 开头的remoteAppUrl,还有一些是 contoso.com。

于 2015-10-22T17:12:44.800 回答
1

使用此示例获取清单,您可以根据自己的喜好对其进行编辑:github.com/jasonjoh/command-demo

于 2015-10-27T04:53:28.493 回答