Microsoft Add Ins Ribbon自定义选项卡在Outlook中不起作用

时间:2018-12-06 11:51:36

标签: macos office-js outlook-web-addins

我正在为Outlook开发一个加载项,其中包含一个自定义选项卡,一些组和几个按钮。

作为一项健全性测试,我创建了一个清单,该清单将为我提供自定义选项卡,一组和一个按钮,请参见下面的示例代码(出于安全性/机密性考虑而删除):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OfficeApp
 xsi:type="MailApp"
 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/1.0">
  <Id>3146b891-b800-431c-8fd3-feceea31a889</Id>
  <Version>1.2</Version>
  <ProviderName>redacted</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="redacted mikeeTest Add-In"/>
  <Description DefaultValue="Various features from mikee directly in your Outlook or OWA."/>
  <IconUrl DefaultValue="redacted"/>
  <HighResolutionIconUrl DefaultValue="redacted"/>
  <SupportUrl DefaultValue="redacted" />
  <AppDomains>
    <!-- redacted -->
  </AppDomains>
  <Hosts>
    <Host Name="Mailbox"/>
  </Hosts>
  <Requirements>
    <Sets>
      <Set Name="MailBox" MinVersion="1.4"/>
    </Sets>
  </Requirements>
  <FormSettings>
    <Form xsi:type="ItemRead">
      <DesktopSettings>
        <SourceLocation DefaultValue="redacted"/>
        <RequestedHeight>250</RequestedHeight>
      </DesktopSettings>
    </Form>
  </FormSettings>
  <Permissions>ReadWriteMailbox</Permissions>
  <Rule xsi:type="RuleCollection" Mode="Or">
    <Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit" />
    <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">
            <CustomTab id="TabTest">
              <Group id="mikeeTestGroup">
                <Label resid="mikeeTestGroupLabel"/>
                <Control xsi:type="Menu" id="mikeeTestMenu">
                  <Label resid="mikeeTestMenuLabel" />
                  <Supertip>
                    <Title resid="mikeeTestMenuTitle" />
                    <Description resid="mikeeTestMenuLabelDesc" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="mikeeTestMenuIcon-16" />
                    <bt:Image size="32" resid="mikeeTestMenuIcon-32" />
                    <bt:Image size="80" resid="mikeeTestMenuIcon-80" />
                  </Icon>
                  <Items>
                    <Item id="delBlock">
                      <Label resid="delBlockButtonLabel" />
                      <Supertip>
                        <Title resid="delBlockButtonTitle" />
                        <Description resid="delBlockButtonLabelDesc" />
                      </Supertip>
                      <Icon>
                        <bt:Image size="16" resid="delBlockIcon-16" />
                        <bt:Image size="32" resid="delBlockIcon-32" />
                        <bt:Image size="80" resid="delBlockIcon-80" />
                      </Icon>
                      <Action xsi:type="ExecuteFunction">
                        <FunctionName>deleteAndBlockSender</FunctionName>
                      </Action>
                    </Item>
                    <Item id="mvToInbox">
                      <Label resid="mvToInboxButtonLabel" />
                      <Supertip>
                        <Title resid="mvToInboxButtonTitle" />
                        <Description resid="mvToInboxButtonLabelDesc" />
                      </Supertip>
                      <Icon>
                        <bt:Image size="16" resid="mvToInboxIcon-16" />
                        <bt:Image size="32" resid="mvToInboxIcon-32" />
                        <bt:Image size="80" resid="mvToInboxIcon-80" />
                      </Icon>
                      <Action xsi:type="ExecuteFunction">
                        <FunctionName>moveToInbox</FunctionName>
                      </Action>
                    </Item>
                    <Item id="mvToLowPriority">
                      <Label resid="mvToLowPriorityButtonLabel" />
                      <Supertip>
                        <Title resid="mvToLowPriorityButtonTitle" />
                        <Description resid="mvToLowPriorityButtonLabelDesc" />
                      </Supertip>
                      <Icon>
                        <bt:Image size="16" resid="mvToLowPriorityIcon-16" />
                        <bt:Image size="32" resid="mvToLowPriorityIcon-32" />
                        <bt:Image size="80" resid="mvToLowPriorityIcon-80" />
                      </Icon>
                      <Action xsi:type="ExecuteFunction">
                        <FunctionName>moveToLowPriority</FunctionName>
                      </Action>
                    </Item>
                    <Item id="markAsSuspicious">
                      <Label resid="markAsSuspiciousButtonLabel" />
                      <Supertip>
                        <Title resid="markAsSuspiciousButtonTitle" />
                        <Description resid="markAsSuspiciousButtonLabelDesc" />
                      </Supertip>
                      <Icon>
                        <bt:Image size="16" resid="markAsSuspiciousIcon-16" />
                        <bt:Image size="32" resid="markAsSuspiciousIcon-32" />
                        <bt:Image size="80" resid="markAsSuspiciousIcon-80" />
                      </Icon>
                      <Action xsi:type="ExecuteFunction">
                        <FunctionName>markAsSuspicious</FunctionName>
                      </Action>
                    </Item>
                  </Items>
                </Control>
              </Group>
              <Label resid="onePluginTabLabel"/>
            </CustomTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    <Resources>

      <bt:Images>
        <bt:Image id="mikeeTestMenuIcon-16" DefaultValue="redacted"/>
        <bt:Image id="mikeeTestMenuIcon-32" DefaultValue="redacted"/>
        <bt:Image id="mikeeTestMenuIcon-80" DefaultValue="redacted"/>

        <bt:Image id="delBlockIcon-16" DefaultValue="redacted"/>
        <bt:Image id="delBlockIcon-32" DefaultValue="redacted"/>
        <bt:Image id="delBlockIcon-80" DefaultValue="redacted"/>

        <bt:Image id="mvToInboxIcon-16" DefaultValue="redacted"/>
        <bt:Image id="mvToInboxIcon-32" DefaultValue="redacted"/>
        <bt:Image id="mvToInboxIcon-80" DefaultValue="redacted"/>

        <bt:Image id="mvToLowPriorityIcon-16" DefaultValue="redacted"/>
        <bt:Image id="mvToLowPriorityIcon-32" DefaultValue="redacted"/>
        <bt:Image id="mvToLowPriorityIcon-80" DefaultValue="redacted"/>

        <bt:Image id="markAsSuspiciousIcon-16" DefaultValue="redacted"/>
        <bt:Image id="markAsSuspiciousIcon-32" DefaultValue="redacted"/>
        <bt:Image id="markAsSuspiciousIcon-80" DefaultValue="redacted"/>
      </bt:Images>

      <bt:Urls>
        <bt:Url id="funcFile" DefaultValue="redacted"/>
      </bt:Urls>

      <bt:ShortStrings>
          <bt:String id="mikeeTestGroupLabel" DefaultValue="Email Feedback"/>
          <bt:String id="mikeeTestMenuLabel" DefaultValue="Email Feedback"/>
          <bt:String id="mikeeTestMenuTitle" DefaultValue="Actions providing feedback"/>
          <bt:String id="delBlockButtonLabel" DefaultValue="Delete and Block Sender"/>
          <bt:String id="delBlockButtonTitle" DefaultValue="Delete and Block Sender"/>
          <bt:String id="mvToInboxButtonLabel" DefaultValue="Move to Inbox"/>
          <bt:String id="mvToInboxButtonTitle" DefaultValue="Mark as safe and put back in Inbox"/>
          <bt:String id="mvToLowPriorityButtonLabel" DefaultValue="Move to Low Priority Inbox"/>
          <bt:String id="mvToLowPriorityButtonTitle" DefaultValue="Remove from safe list and move to Low Priority"/>
          <bt:String id="markAsSuspiciousButtonLabel" DefaultValue="Report as Suspicious"/>
          <bt:String id="markAsSuspiciousButtonTitle" DefaultValue="Flag as suspicious"/>
          <bt:String id="quarantineButtonLabel" DefaultValue="End User Web"/>
          <bt:String id="quarantineButtonTitle" DefaultValue="Go to End User Web"/>
          <bt:String id="aboutButtonLabel" DefaultValue="About"/>
          <bt:String id="aboutButtonTitle" DefaultValue="About"/>
          <bt:String id="onePluginTabLabel" DefaultValue="redacted"/>
      </bt:ShortStrings>
      <bt:LongStrings>
          <bt:String id="mikeeTestMenuLabelDesc" DefaultValue="Give feedback about bulk and spam emails"/>
          <bt:String id="delBlockButtonLabelDesc" DefaultValue="Move the email to Trash and add the sender to a block list"/>
          <bt:String id="mvToInboxButtonLabelDesc" DefaultValue="Restore email to Inbox and remove from block list"/>
          <bt:String id="mvToLowPriorityButtonLabelDesc" DefaultValue="Remove from safe list and move to Low Priority folder"/>
          <bt:String id="markAsSuspiciousButtonLabelDesc" DefaultValue="Report this message as suspicious"/>
          <bt:String id="quarantineButtonLabelDesc" DefaultValue="View you quarantine settings in end user web"/>
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
</OfficeApp>

我已经使用Office Addin Validator验证了清单,该清单提供了以下输出:

$ validate-office-addin ~/ef-manifest.xml
Calling validation service. This might take a moment...
-------------------------------------
Validation: Passed
Based on the requirements specified in your manifest, your add-in can run on the following platforms; your add-in will be tested on these platforms when you submit it to the Office Store:
  - Outlook 2013 or later
  - Outlook 2016 or later
  - Outlook 2016 for Mac
  - Outlook on the Web
Important: This analysis is based on the requirements specified in your manifest and does not account for any runtime JavaScript calls within your add-in. For information about which API sets and features are supported on each platform, see Office Add-in host and platform availability. (https://dev.office.com/add-in-availability).

*This does not include mobile apps. You can opt-in to support mobile apps when you submit your add-in.
-------------------------------------

我还确认了我的虚拟模板可用于以下设置:

Windows 10 Pro
Outlook 2019 Version 1808 (Build 10338.20019)

下图显示了加载项,自定义选项卡,组和按钮: custom tab working in Windows

我遇到的问题是,当我尝试在设置为以下的Mac上使用相同的清单时:

macOs High Sierra Version 10.13.6 (17G3025)
Outlook 2016 Version 16.16.4 (181110)

在这种情况下,插件将安装,并且最初可以在商店的“我的插件:自定义插件”部分中看到。但是,当我从商店返回Outlook时,则不会出现加载项。如果随后我又返回商店,则该加载项不再显示在“我的加载项:自定义加载项”部分。

我已经收集了一些信息: MS维护加载项不同部分的支持/可用性列表。当前列出的添加命令在所有可用平台(Web,Windows,Mac,Android等)上受支持。在此处查看列表: MS Outlook add in support

Microsoft文档指出:“您可以使用外接程序命令将功能区上的按钮或项目添加到上下文菜单。”,此处: MS add in commands definition

他们的文档继续说:“附加命令作为按钮出现在功能区上。当用户安装外接程序时,其命令将在UI中显示为一组带有外接程序名称的按钮。可以在功能区的默认选项卡上,也可以在自定义选项卡上。”,这里: MS custom tab support

我已经在这里遇到一个问题,其中提到功能区组在Outlook for Mac中不可用: Related stackoverflow question

因此,根据这段简短的历史,我有两个问题: 1)Mac版Outlook是否支持自定义选项卡? 如果是这样 2)我的清单文件中缺少什么吗?

1 个答案:

答案 0 :(得分:1)

清单中没有丢失任何内容。 Mac Outlook不支持自定义标签。 您将必须使用Office选项卡。

相关问题