ms-word - Office 加载项显示警告 - 其加载项目录(SharePoint 应用程序目录)不支持的功能

标签 ms-word office365 office-js office365-apps

我正在尝试部署 Word 加载项。

  1. 我已将本地服务器上的后端部署到 IIS。我已经检查过它可以访问。
  2. 我在 Office365 中创建了一个应用程序目录并将 list 文件上传到该目录。目录显示插件有效
  3. 我已将 Office365 应用程序目录添加到受信任的目录站点
  4. 我可以添加该应用程序,我看到它显示了我设计的一部分,但它提供了一个信息文本并且插件不起作用:

信息文本:

ADD-IN INFORMATION

This Add-in uses features not supported by its add-in catalog.

list :

<?xml version="1.0" encoding="UTF-8"?>
<!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
<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">

  <!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->

  <!-- IMPORTANT! Id must be unique for your add-in, if you reuse this manifest ensure that you change this id to a new GUID. -->
  <Id>e4a1b6ce-9333-44b5-bf03-59435dbf66ac</Id>

  <!--Version. Updates from the store only get triggered if there is a version change. -->
  <Version>1.0.0.0</Version>
  <ProviderName>Name</ProviderName>
  <DefaultLocale>en-US</DefaultLocale>
  <!-- The display name of your add-in. Used on the store and various places of the Office UI such as the add-ins dialog. -->
  <DisplayName DefaultValue="Name" />
  <Description DefaultValue="Name"/>

  <!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
  <IconUrl DefaultValue="~remoteAppUrl/Images/Button32x32.png" />

  <!-- Domains that will be allowed when navigating. For example, if you use ShowTaskpane and then have an href link, navigation will only be allowed if the domain is on this list. -->
  <AppDomains>
    <AppDomain>AppDomain1</AppDomain>
    <AppDomain>AppDomain2</AppDomain>
    <AppDomain>AppDomain3</AppDomain>
  </AppDomains>
  <!--End Basic Settings. -->
  
  <!--Begin TaskPane Mode integration. This section is used if there are no VersionOverrides or if the Office client version does not support add-in commands. -->
  <Hosts>
    <Host Name="Document" />
  </Hosts>
  <DefaultSettings>
    <SourceLocation DefaultValue="~remoteAppUrl/" />
  </DefaultSettings>
  <!-- End TaskPane Mode integration.  -->

  <Permissions>ReadWriteDocument</Permissions>

  <!-- Begin Add-in Commands Mode integration. -->
  <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
    
    <!-- The Hosts node is required. -->
    <Hosts>
      <!-- Each host can have a different set of commands. -->
      <!-- Excel host is Workbook, Word host is Document, and PowerPoint host is Presentation. -->
      <!-- Make sure the hosts you override match the hosts declared in the top section of the manifest. -->
      <Host xsi:type="Document">
        <!-- Form factor. Currently only DesktopFormFactor is supported. -->
        <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. resid points to a ShortString resource -->
            <Title resid="Name.GetStarted.Title"/>

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

            <!-- Point to a url resource which details how the add-in should be used. -->
            <LearnMoreUrl resid="Name.GetStarted.LearnMoreUrl"/>
          </GetStarted>
          <!-- Function file is a HTML page that includes the JavaScript where functions for ExecuteAction will be called. 
            Think of the FunctionFile as the code behind ExecuteFunction. -->
          <FunctionFile resid="Name.DesktopFunctionFile.Url" />

          <!-- PrimaryCommandSurface is the main Office Ribbon. -->
          <ExtensionPoint xsi:type="PrimaryCommandSurface">
            <!-- Use OfficeTab to extend an existing Tab. Use CustomTab to create a new tab. -->
            <OfficeTab id="TabHome">
              <!-- Ensure you provide a unique id for the group. Recommendation for any IDs is to namespace using your company name. -->
              <Group id="Name.Group1">
                <!-- Label for your group. resid must point to a ShortString resource. -->
                <Label resid="Name.Group1Label" />
                <!-- Icons. Required sizes 16,32,80, optional 20, 24, 40, 48, 64. Strongly recommended to provide all sizes for great UX. -->
                <!-- Use PNG icons. All URLs on the resources section must use HTTPS. -->
                <Icon>
                  <bt:Image size="16" resid="Name.tpicon_16x16" />
                  <bt:Image size="32" resid="Name.tpicon_32x32" />
                  <bt:Image size="80" resid="Name.tpicon_80x80" />
                </Icon>

                <!-- Control. It can be of type "Button" or "Menu". -->
                <Control xsi:type="Button" id="Name.TaskpaneButton">
                  <Label resid="Name.TaskpaneButton.Label" />
                  <Supertip>
                    <!-- ToolTip title. resid must point to a ShortString resource. -->
                    <Title resid="Name.TaskpaneButton.Label" />
                    <!-- ToolTip description. resid must point to a LongString resource. -->
                    <Description resid="Name.TaskpaneButton.Tooltip" />
                  </Supertip>
                  <Icon>
                    <bt:Image size="16" resid="Name.tpicon_16x16" />
                    <bt:Image size="32" resid="Name.tpicon_32x32" />
                    <bt:Image size="80" resid="Name.tpicon_80x80" />
                  </Icon>

                  <!-- This is what happens when the command is triggered (E.g. click on the Ribbon). Supported actions are ExecuteFunction or ShowTaskpane. -->
                  <Action xsi:type="ShowTaskpane">
                    <TaskpaneId>ButtonId1</TaskpaneId>
                    <!-- Provide a url resource id for the location that will be displayed on the task pane. -->
                    <SourceLocation resid="Name.Taskpane.Url" />
                  </Action>
                </Control>
              </Group>
            </OfficeTab>
          </ExtensionPoint>
        </DesktopFormFactor>
      </Host>
    </Hosts>
    
    <!-- You can use resources across hosts and form factors. -->
    <Resources>
      <bt:Images>
        <bt:Image id="Name.tpicon_16x16" DefaultValue="~remoteAppUrl/App_Data/img/Name_logo_16.png" />
        <bt:Image id="Name.tpicon_32x32" DefaultValue="~remoteAppUrl/App_Data/img/Name_logo_32.png" />
        <bt:Image id="Name.tpicon_80x80" DefaultValue="~remoteAppUrl/Images/Button80x80.png" />
      </bt:Images>
      <bt:Urls>
        <bt:Url id="Name.DesktopFunctionFile.Url" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html" />
        <bt:Url id="Name.Taskpane.Url" DefaultValue="~remoteAppUrl/" />
        <bt:Url id="Name.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
      </bt:Urls>
      <!-- ShortStrings max characters==125. -->
      <bt:ShortStrings>
        <bt:String id="Name.TaskpaneButton.Label" DefaultValue="Templates" />
        <bt:String id="Name.Group1Label" DefaultValue="Name" />
        <bt:String id="Name.GetStarted.Title" DefaultValue="Name templates" />
      </bt:ShortStrings>
      <!-- LongStrings max characters==250. -->
      <bt:LongStrings>
        <bt:String id="Name.TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
        <bt:String id="Name.GetStarted.Description" DefaultValue="Your sample add-in loaded succesfully. Go to the HOME tab and click the 'Show Taskpane' button to get started." />
      </bt:LongStrings>
    </Resources>
  </VersionOverrides>
  <!-- End Add-in Commands Mode integration. -->

</OfficeApp>

我假设这是导致此问题的 list 文件。我不确定这个文件有什么问题,因为我遵循了默认教程和文件 -> Visual Studio 中的新项目。

最佳答案

SharePoint 加载项目录不支持加载项命令注释。短期内唯一支持加载项命令的部署选项(商店除外)是我们新的 Office 365 集中部署工具,目前处于预览状态。查看文档 here . (请注意,预览目前仅适用于以下地区:美国、加拿大、英国、澳大利亚、爱尔兰和新西兰。)

也就是说,您仍然可以使用基于 SP 的目录,但是您需要从 list 中删除加载项命令注释(所有覆盖),并且用户需要转到插入对话框以插入您的加载项。

请确保consult this page for all the deployment options用于加载项和关于每个加载项的重要说明。

关于ms-word - Office 加载项显示警告 - 其加载项目录(SharePoint 应用程序目录)不支持的功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39371718/

相关文章:

office-js - 使用 Office Online 对话框 API 设置对话框的恒定大小

javascript - 为什么在本地引用时 office.js 不起作用?

python - 使用pywin32跳转到word文档中的指定页面

vb.net - 通过 vb.net 将表格插入到 word 中

javascript - 每次在 Word 文档中插入/删除新评论时调用一个函数,使用 Javascript API for Office Add-Ins

azure - 是否可以使用 LDAP 从 Office365 - Exchange Online/Azure 检索数据?

javascript - Office 365 API 使 Word for Mac 上的加载项崩溃

version-control - 通过交叉授粉跟踪、维护销售/营销 Word 文档的多种变体/风格的策略?

windows-7 - 浏览文件时 Office 365 日期修改格式不正确

office365 - O365、EWS 托管 API 和 ExchangeVersion