2017-12-27 1141 views
1

我正在关注this link以尝试自定义功能。下面的清单确实启用自定义功能:同时具有自定义功能和任务窗格

<?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"> 
    <Id>a124c024-2ae8-4d1a-bb00-7ff68c6fb738</Id> 
    <!-- Generate a new guid for your Id element --> 
    <Version>1.0.0.0</Version> 
    <ProviderName>Contoso</ProviderName> 
    <DefaultLocale>en-US</DefaultLocale> 
    <DisplayName DefaultValue="Custom functions sample" /> 
    <Description DefaultValue="A variety of sample custom functions." /> 
    <Hosts> 
    <Host Name="Workbook" /> 
    </Hosts> 
    <DefaultSettings> 
    <SourceLocation DefaultValue="https://www.myweb.com/customfunctions.html"/> 
    </DefaultSettings> 
    <Permissions>ReadWriteDocument</Permissions> 
    <VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0"> 
    <Hosts> 
     <Host xsi:type="Workbook"> 
     <AllFormFactors> 
      <ExtensionPoint xsi:type="CustomFunctions"> 
      <Script> 
       <SourceLocation resid="functionsjs" /> 
      </Script> 
      <Page> 
       <SourceLocation resid="functionshtml"/> 
      </Page> 
      </ExtensionPoint> 
     </AllFormFactors> 
     </Host> 
    </Hosts> 
    <Resources> 
     <bt:Urls> 
     <bt:Url id="functionsjs" DefaultValue="https://www.myweb.com/customfunctions.js" /> 
     <bt:Url id="functionshtml" DefaultValue="https://www.myweb.com/customfunctions.html" /> 
     </bt:Urls> 
    </Resources> 
    </VersionOverrides> 
</OfficeApp> 

现在,我想知道是否有可能有自定义的功能,并在同一时间的任务窗格。所以我在https://www.myweb.com/customfunctions.html中加了<body>this is the body</body>。但是,重新加载外接程序不会使任务窗格显示。

任何人都可以告诉我是否有可能同时具有自定义函数和任务窗格?我应该修改什么来启用此功能?

编辑1:更改xsi:type="VersionOverridesV1_0"xsi:type="TaskPaneApp"没有打开任务窗格,但是当我们试图在自定义函数,错误'我们不能启动此插件,因为它没有正确设置”升起。

所以我还在寻找一个妥善的解决办法。

回答

0

是的,你可以自定义功能和在同一个插件,通过使用附加命令。

在同一时间的任务窗格

要启用任务窗格命令,请使用ShowTaskpane操作您的清单(请参阅help topic,如此sample manifest on GitHub)。

如果您还希望任务窗格在插入时处于“永久”状态,请使用this topic page自动打开任务窗格。

-Michael(PM用于定制功能)

相关问题