Office 加载项 XML 清单

本文介绍 Office 外接程序的 XML 格式清单。它假定你熟悉 Office 外接程序清单。 除了本文中所述的用途外,XML 格式的清单还支持 Microsoft 365 统一清单中不支持的某些 Outlook 外接程序功能。 例如,Outlook 外接程序的 XML 清单可以定义一个或多个规则,以指定激活加载项的上下文。

提示

有关 Microsoft 365 统一清单的概述,请参阅 具有 Microsoft 365 统一清单的 Office 加载项 (预览版)

架构版本

并非所有 Office 客户端都支持最新功能,并且某些 Office 用户将具有较旧版本的 Office。 使用多个架构版本可让开发人员构建可向后兼容的外接程序,同时使用对较早版本仍可用的最新功能。

<清单中的 VersionOverrides> 元素就是一个示例。 在 VersionOverrides> 中<定义的所有元素都将覆盖清单另一部分中的相同元素。 这意味着,如果可能,Office 将使用 VersionOverrides> 部分中的内容<来设置加载项。 但是,如果 Office 版本不支持特定版本的 <VersionOverrides,Office> 将忽略它,并依赖于清单其余部分中的信息。

此方法意味着开发人员无需创建多个单独的清单,而是将定义的所有内容保留在一个文件中。

架构的当前版本为:

版本 说明
v1.0 支持 Office JavaScript API 1.0 版。 例如,在 Outlook 外接程序中,这支持阅读窗体。
v1.1 支持 1.1 版的 Office JavaScript API 和 <VersionOverrides>。 例如,在 Outlook 加载项中,这将添加对撰写窗体的支持。
<VersionOverrides> 1.0 支持 Office JavaScript API 的更高版本。 这支持外接程序命令。
<VersionOverrides> 1.1 仅受 Outlook 支持。 此版本的 <VersionOverrides> 添加了对较新功能的支持,例如 可固定的任务窗格 和移动加载项。

即使外接程序清单使用 <VersionOverrides> 元素,仍必须包含 v1.1 清单元素,以允许外接程序使用不支持 <VersionOverrides 的>旧客户端。

注意

Office 使用架构来验证清单。 此架构要求清单中的元素按特定顺序显示。 如果未按规定顺序添加元素,可能会在旁加载外接程序时看到错误消息。 请参阅 如何按所需顺序查找清单元素元素的正确 顺序。

必需元素

下表指定了三种类型 Office 加载项的必需元素。

注意

还存在强制性命令,其中元素必须出现在其父元素中。 有关详细信息,请参阅 如何查找 XML 清单元素的正确顺序

Office 加载项类型的必需元素

元素 内容 任务窗格 邮件
(Outlook)
OfficeApp 必需 必需 必需
Id 必需 必需 必需
版本 必需 必需 必需
ProviderName 必需 必需 必需
DefaultLocale 必需 必需 必需
DisplayName 必需 必需 必需
Description 必需 必需 必需
SupportUrl** 必需 必需 必需
DefaultSettings (ContentApp)
DefaultSettings (TaskPaneApp)
必需 必需 不可用
SourceLocation (ContentApp)
SourceLocation (TaskPaneApp)
SourceLocation (MailApp)
必需 必需 必需
DesktopSettings 不可用 不可用 必需
Permissions (ContentApp)
Permissions (TaskPaneApp)
Permissions (MailApp)
必需 必需 必需
Rule (RuleCollection)
Rule (MailApp)
不可用 不可用 必需
要求 (MailApp)* 不适用 不可用 必需
设置*
集(要求)*
集 (MailAppRequirements)*
必需 必需 必需
表单*
FormSettings*
不可用 不可用 必需
主机* 必需 必需 可选

*在 Office 外接程序清单架构版本 1.1 中添加。

** 只有通过 AppSource 分发的加载项才需要 SupportUrl。

根元素

Office 外接程序清单的根元素是 <OfficeApp>。 此元素还声明默认命名空间、架构版本和外接程序类型。 将清单中的所有其他元素置于其开始标记和结束标记中。 下面是根元素的一个示例。

<OfficeApp
  xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
  xmlns:xsi="https://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"
  xsi:type="MailApp">

  <!-- The rest of the manifest. -->

</OfficeApp>

Version

这是特定的外接程序的版本。 如果开发人员更新清单中的某些内容,则版本也必须逐步增加。 这样一来,在安装新的清单时,它将覆盖现有的版本,用户将获得新的功能。 如果已将此外接程序提交至应用商店,则必须重新提交新清单并重新验证。 然后,此外接程序的用户将在该清单被批准后几小时内自动获得新更新的清单。

如果外接程序所请求的权限发生了更改,则系统将提示用户对外接程序进行升级和重新许可。 如果管理员为整个组织安装该外接程序,则管理员需首先对其重新许可。 在授予同意之前,用户将无法使用该加载项。

Hosts

Office 加载项指定 Hosts> 元素,<如下所示:

<OfficeApp>
...
  <Hosts>
    <Host Name="Mailbox" />
  </Hosts>
...
</OfficeApp>

这与 VersionOverrides> 元素中的<Hosts> 元素不同,在带有 XML 清单的Create外接程序命令中对此进行了讨论。<

使用 AppDomains 元素指定安全域

XML 清单文件的 AppDomains 元素用于告知 Office 应允许外接程序导航到哪些域。 如指定要在加载项窗口中打开的域中所述,在 Office web 版 中运行时,任务窗格可以导航到任何 URL。 但是,在桌面平台中,如果外接程序尝试转到托管起始页的域以外的域中的 URL, (如 SourceLocation 元素) 所指定,该 URL 将在 Office 应用程序的外接程序窗格外的新浏览器窗口中打开。

若要替代此 (桌面 Office) 行为,请将要在外接程序窗口中打开的每个域添加到 AppDomains> 元素中指定的<域列表中。 如果加载项尝试转至该列表的域中的 URL,则它将在 Office 网页版和桌面版中的任务窗口中打开。 如果它尝试转到不在列表中的 URL,则在桌面 Office 中,该 URL 将在新的浏览器窗口中打开, (加载项窗格) 外部。

下表描述了浏览器在加载项尝试导航至加载项默认域外部 URL 时的行为。

Office 客户端 在 AppDomains 中定义的域? 浏览器行为
所有客户端 链接将在加载项任务窗格中打开。
Windows 上的 Office 2016 (批量许可的永久) 链接将在 Internet Explorer 11 中打开。
其他客户端 链接将在用户的默认浏览器中打开。

下面的 XML 清单示例在 SourceLocation> 元素中指定的<域中托管其main外接程序页https://www.contoso.com。 它还指定 https://www.northwindtraders.comAppDomains 元素列表中的 AppDomain 元素>中的<域。 如果加载项转到 www.northwindtraders.com 域中的页面,此页面会在加载项窗格中打开,即使是在 Office 桌面版中,也不例外。

<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp">
  <!--IMPORTANT! Id must be unique for each add-in. If you copy this manifest ensure that you change this id to your own GUID. -->
  <Id>c6890c26-5bbb-40ed-a321-37f07909a2f0</Id>
  <Version>1.0</Version>
  <ProviderName>Contoso, Ltd</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <DisplayName DefaultValue="Northwind Traders Excel" />
  <Description DefaultValue="Search Northwind Traders data from Excel"/>
  <SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]" />
  <AppDomains>
    <AppDomain>https://www.northwindtraders.com</AppDomain>
  </AppDomains>
  <DefaultSettings>
    <SourceLocation DefaultValue="https://www.contoso.com/search_app/Default.aspx" />
  </DefaultSettings>
  <Permissions>ReadWriteDocument</Permissions>
</OfficeApp>

清单中的版本替代

可选的 VersionOverrides 元素包含启用其他加载项功能的子标记。 其中一些为:

  • 自定义 Office 功能区和菜单。
  • 自定义 Office 与运行外接程序的嵌入式运行时的工作方式。
  • 配置加载项如何与 Azure Active Directory 和 Microsoft Graph 交互以进行单一登录。

VersionOverrides 的一些子代元素具有替代父级 OfficeApp 元素值的值。 例如,VersionOverrides 中的 Hosts 元素替代 OfficeApp 中的 Hosts 元素。

VersionOverrides 元素具有其自己的架构(实际上有四个架构),具体取决于加载项的类型及其使用的功能。 架构包括:

在使用 VersionOverrides 元素时,OfficeApp 元素必须具有标识相应架构的 xmlns 属性。 属性的可能值如下:

  • http://schemas.microsoft.com/office/taskpaneappversionoverrides
  • http://schemas.microsoft.com/office/contentappversionoverrides
  • http://schemas.microsoft.com/office/mailappversionoverrides

VersionOverrides 元素本身还必须具有 xmlns 属性来指定架构。 可能的值包括上述三个和以下值:

  • http://schemas.microsoft.com/office/mailappversionoverrides/1.1

VersionOverrides元素还必须具有指定架构版本的 xsi:type 属性。 可能的值如下:

  • VersionOverridesV1_0
  • VersionOverridesV1_1

以下是在任务窗格加载项和邮件加载项中分别使用的 VersionOverrides 的示例。 请注意,在使用版本 1.1 的邮件 VersionOverrides 时,它必须是类型 1.0 的父级 VersionOverrides 的最后一个子级。 内部 VersionOverrides 中子元素的值替代父级 VersionOverrides 和祖父级 OfficeApp 元素中同名元素的值。

<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    <!-- Child elements are omitted. -->
</VersionOverrides>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
  <!-- Other child elements are omitted. -->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
    <!-- Child elements are omitted. -->
  </VersionOverrides>
</VersionOverrides>

有关包含 VersionOverrides 元素的清单示例,请参阅 清单 v1.1 XML 文件示例和架构

要求

Requirements<> 元素指定加载项可用的 API 集。 有关要求集的详细信息,请参阅 Office 要求集可用性。 例如,在 Outlook 外接程序中,要求集必须是 Mailbox,值必须大于 1.1。

Requirements<> 元素还可以显示在 VersionOverrides> 元素中<,允许外接程序在支持 <VersionOverrides> 的客户端中加载时指定其他要求。

以下示例使用 Sets> 元素的<DefaultMinVersion 属性要求 office.js 版本 1.1 或更高版本,并使用 Set> 元素的<MinVersion 属性要求邮箱要求集版本 1.1。

<OfficeApp>
...
  <Requirements>
    <Sets DefaultMinVersion="1.1">
      <Set Name="MailBox" MinVersion="1.1" />
    </Sets>
  </Requirements>
...
</OfficeApp>

本地化

外接程序的某些方面需要进行本地化以适用于不同的区域设置,例如名称、介绍以及所加载的 URL。 通过指定默认值,然后在 VersionOverrides> 元素中的 Resources 元素<中替代区域设置,可以轻松本地化这些元素。<> 下面介绍了如何替代图像、URL 和字符串。

<Resources>
  <bt:Images>
    <bt:Image id="icon1_16x16" DefaultValue="https://contoso.com/images/app_icon_small.png" >
      <bt:Override Locale="ar-sa" Value="https://contoso.com/images/app_icon_small_arsa.png" />
      <!-- Add information for other locales. -->
    </bt:Image>
  </bt:Images>

  <bt:Urls>
    <bt:Url id="residDesktopFuncUrl" DefaultValue="https://contoso.com/urls/page_appcmdcode.html" >
      <bt:Override Locale="ar-sa" Value="https://contoso.com/urls/page_appcmdcode.html?lcid=ar-sa" />
      <!-- Add information for other locales. -->
    </bt:Url>
  </bt:Urls>

  <bt:ShortStrings> 
    <bt:String id="residViewTemplates" DefaultValue="Launch My Add-in">
      <bt:Override Locale="ar-sa" Value="<add localized value here>" />
      <!-- Add information for other locales. -->
    </bt:String>
  </bt:ShortStrings>
</Resources>

架构引用包含有关哪些元素可以本地化的完整信息。

清单 v1.1 XML 文件示例和架构

以下部分演示 Outlook) 加载项的内容、任务窗格和邮件 (清单 v1.1 XML 文件的示例。

加载项清单架构

<?xml version="1.0" encoding="utf-8"?>
<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 copy this manifest, ensure that you change this ID to your own GUID. -->
  <Id>e504fb41-a92a-4526-b101-542f357b7acb</Id>
  <Version>1.0.0.0</Version>
  <ProviderName>Contoso</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-in's dialog. -->
  <DisplayName DefaultValue="Add-in Commands Sample" />
  <Description DefaultValue="Sample that illustrates add-in commands basic control types and actions." />
  <!-- Icon for your add-in. Used on installation screens and the add-in's dialog. -->
  <IconUrl DefaultValue="https://contoso.com/assets/icon-32.png" />
  <HighResolutionIconUrl DefaultValue="https://contoso.com/assets/hi-res-icon.png" />
  <SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]" />
  <!-- Domains that are allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation is only allowed if the domain is on this list. -->
  <AppDomains>
    <AppDomain>AppDomain1</AppDomain>
    <AppDomain>AppDomain2</AppDomain>
  </AppDomains>
  <!-- End Basic Settings. -->

  <!-- BeginTaskPaneMode integration. 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://commandsimple.azurewebsites.net/Taskpane.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. DesktopFormFactor is supported. Other form factors are available depending on the host and feature. -->
        <DesktopFormFactor>
          <!-- This code enables a customizable message to be displayed when the add-in is loaded successfully upon individual install. -->
          <GetStarted>
            <!-- Title of the Getting Started callout. The resid attribute 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"/>  
            <!-- Points to a URL resource which details how the add-in should be used. -->
            <LearnMoreUrl resid="Contoso.GetStarted.LearnMoreUrl"/>
          </GetStarted>
          <!-- Function file is an HTML page that includes, or loads, 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 app 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.GroupLabel" />
                <Icon>
                  <!-- Each size needs its own icon resource or it will look distorted when resized. -->
                  <!-- Icons. Required sizes: 16, 32, 80; optional: 20, 24, 40, 48, 64. You should provide as many sizes as possible for a great user experience. -->
                  <!-- Use PNG icons and remember that all URLs on the resources section must use HTTPS. -->
                  <bt:Image size="16" resid="Contoso.TaskpaneButton.Icon16" />
                  <bt:Image size="32" resid="Contoso.TaskpaneButton.Icon32" />
                  <bt:Image size="80" resid="Contoso.TaskpaneButton.Icon80" />
                </Icon>

                <!-- Control. It can be of type "Button" or "Menu". -->
                <Control xsi:type="Button" id="Contoso.FunctionButton">
                  <!-- Label for your button. resid must point to a ShortString resource. -->
                  <Label resid="Contoso.FunctionButton.Label" />
                  <Supertip>
                    <!-- ToolTip title. resid must point to a ShortString resource. -->
                    <Title resid="Contoso.FunctionButton.Label" />
                    <!-- ToolTip description. resid must point to a LongString resource. -->
                    <Description resid="Contoso.FunctionButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Contoso.FunctionButton.Icon16" />
                    <bt:Image size="32" resid="Contoso.FunctionButton.Icon32" />
                    <bt:Image size="80" resid="Contoso.FunctionButton.Icon80" />
                  </Icon>
                  <!-- This is what happens when the command is triggered (e.g., click on the ribbon button). -->
                  <!-- Supported actions are ExecuteFunction or ShowTaskpane. -->
                  <!-- Look at the FunctionFile.html page for reference on how to implement the function. -->
                  <Action xsi:type="ExecuteFunction">
                    <!-- Name of the function to call. This function needs to exist in the global DOM namespace of the function file. -->
                    <FunctionName>writeText</FunctionName>
                  </Action>
                </Control>

                <Control xsi:type="Button" id="Contoso.TaskpaneButton">
                  <Label resid="Contoso.TaskpaneButton.Label" />
                  <Supertip>
                    <Title resid="Contoso.TaskpaneButton.Label" />
                    <Description resid="Contoso.TaskpaneButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Contoso.TaskpaneButton.Icon16" />
                    <bt:Image size="32" resid="Contoso.TaskpaneButton.Icon32" />
                    <bt:Image size="80" resid="Contoso.TaskpaneButton.Icon80" />
                  </Icon>
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>Button2Id1</TaskpaneId>
                    <!-- Provide a URL resource ID for the location that will be displayed on the task pane. -->
                    <SourceLocation resid="Contoso.Taskpane1.Url" />
                  </Action>
                </Control>
                <!-- Menu example. -->
                <Control xsi:type="Menu" id="Contoso.Menu">
                  <Label resid="Contoso.Dropdown.Label" />
                  <Supertip>
                    <Title resid="Contoso.Dropdown.Label" />
                    <Description resid="Contoso.Dropdown.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Contoso.TaskpaneButton.Icon16" />
                    <bt:Image size="32" resid="Contoso.TaskpaneButton.Icon32" />
                    <bt:Image size="80" resid="Contoso.TaskpaneButton.Icon80" />
                  </Icon>
                  <Items>
                    <Item id="Contoso.Menu.Item1">
                      <Label resid="Contoso.Item1.Label"/>
                      <Supertip>
                        <Title resid="Contoso.Item1.Label" />
                        <Description resid="Contoso.Item1.Tooltip" />
                      </Supertip>
                      <Icon>
                        <bt:Image size="16" resid="Contoso.TaskpaneButton.Icon16" />
                        <bt:Image size="32" resid="Contoso.TaskpaneButton.Icon32" />
                        <bt:Image size="80" resid="Contoso.TaskpaneButton.Icon80" />
                      </Icon>
                      <Action xsi:type="ShowTaskpane">
                        <TaskpaneId>MyTaskPaneID1</TaskpaneId>
                        <SourceLocation resid="Contoso.Taskpane1.Url" />
                      </Action>
                    </Item>

                    <Item id="Contoso.Menu.Item2">
                      <Label resid="Contoso.Item2.Label"/>
                      <Supertip>
                        <Title resid="Contoso.Item2.Label" />
                        <Description resid="Contoso.Item2.Tooltip" />
                      </Supertip>
                      <Icon>
                        <bt:Image size="16" resid="Contoso.TaskpaneButton.Icon16" />
                        <bt:Image size="32" resid="Contoso.TaskpaneButton.Icon32" />
                        <bt:Image size="80" resid="Contoso.TaskpaneButton.Icon80" />
                      </Icon>
                      <Action xsi:type="ShowTaskpane">
                        <TaskpaneId>MyTaskPaneID2</TaskpaneId>
                        <SourceLocation resid="Contoso.Taskpane2.Url" />
                      </Action>
                    </Item>

                  </Items>
                </Control>

              </Group>

              <!-- Label of your tab. -->
              <!-- If validating with XSD, it needs to be at the end. -->
              <Label resid="Contoso.Tab1.TabLabel" />
            </CustomTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>

    <!-- You can use resources across hosts and form factors. -->
    <Resources>
      <bt:Images>
        <bt:Image id="Contoso.TaskpaneButton.Icon16" DefaultValue="https://myCDN/Images/Button16x16.png" />
        <bt:Image id="Contoso.TaskpaneButton.Icon32" DefaultValue="https://myCDN/Images/Button32x32.png" />
        <bt:Image id="Contoso.TaskpaneButton.Icon80" DefaultValue="https://myCDN/Images/Button80x80.png" />
        <bt:Image id="Contoso.FunctionButton.Icon" DefaultValue="https://myCDN/Images/ButtonFunction.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Contoso.FunctionFile.Url" DefaultValue="https://commandsimple.azurewebsites.net/FunctionFile.html" />
        <bt:Url id="Contoso.Taskpane1.Url" DefaultValue="https://commandsimple.azurewebsites.net/Taskpane.html" />
        <bt:Url id="Contoso.Taskpane2.Url" DefaultValue="https://commandsimple.azurewebsites.net/Taskpane2.html" />
      </bt:Urls>
      <!-- ShortStrings max characters=125. -->
      <bt:ShortStrings>
        <bt:String id="Contoso.FunctionButton.Label" DefaultValue="Execute Function" />
        <bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="Show Task Pane" />
        <bt:String id="Contoso.Dropdown.Label" DefaultValue="Dropdown" />
        <bt:String id="Contoso.Item1.Label" DefaultValue="Show Task Pane 1" />
        <bt:String id="Contoso.Item2.Label" DefaultValue="Show Task Pane 2" />
        <bt:String id="Contoso.Tab1.GroupLabel" DefaultValue="Test Group" />
         <bt:String id="Contoso.Tab1.TabLabel" DefaultValue="Test Tab" />
      </bt:ShortStrings>
      <!-- LongStrings max characters=250. -->
      <bt:LongStrings>
        <bt:String id="Contoso.FunctionButton.Tooltip" DefaultValue="Click to execute function." />
        <bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="Click to show a task pane." />
        <bt:String id="Contoso.Dropdown.Tooltip" DefaultValue="Click to show options on this menu." />
        <bt:String id="Contoso.Item1.Tooltip" DefaultValue="Click to show Task Pane 1." />
        <bt:String id="Contoso.Item2.Tooltip" DefaultValue="Click to show Task Pane 2." />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
  <!-- EndAddinCommandsMode integration. -->
</OfficeApp>

验证 Office 加载项的清单

有关根据 XML 架构定义 (XSD) 验证清单的信息,请参阅验证 Office 加载项的清单

另请参阅