You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Office加载项自定义选项卡桌面版PPT/Excel不显示求助

解决桌面版PowerPoint/Excel中Office加载项自定义选项卡不显示的问题

我仔细检查了你的manifest文件,发现问题出在Presentation(PowerPoint)部分的Group节点内元素顺序错误——桌面版PowerPoint和Excel对manifest的XML节点顺序要求比Word和Web版更严格,这就是为什么加载提示成功但选项卡却不显示的核心原因。

问题具体位置

在<Host xsi:type="Presentation">的<Group>节点里,你把<Label resid="CommandsGroup.Label"/>放在了<Control>之后,而正确的顺序应该是先声明Group的Label,再定义Icon和Control。Workbook和Document部分的顺序是正确的,所以它们能正常显示自定义选项卡。

修复步骤

  1. 找到manifest中对应Presentation的Group节点:
<Group id="MyCompanyCommands">
  <Icon>
    <bt:Image size="16" resid="Icon.16x16"/>
    <bt:Image size="32" resid="Icon.32x32"/>
    <bt:Image size="80" resid="Icon.80x80"/>
  </Icon>
  <Control xsi:type="Button" id="MyCompanyTaskpaneButton">
    <!-- 按钮内容 -->
  </Control>
  <Label resid="CommandsGroup.Label"/>
</Group>
  1. 将<Label resid="CommandsGroup.Label"/>移到<Icon>之前,修正后结构如下:
<Group id="MyCompanyCommands">
  <Label resid="CommandsGroup.Label"/>
  <Icon>
    <bt:Image size="16" resid="Icon.16x16"/>
    <bt:Image size="32" resid="Icon.32x32"/>
    <bt:Image size="80" resid="Icon.80x80"/>
  </Icon>
  <Control xsi:type="Button" id="MyCompanyTaskpaneButton">
    <!-- 按钮内容 -->
  </Control>
</Group>

修正后的完整Manifest代码

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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>130f75aa-a500-458a-bc48-031e57b7d70e</Id>
<Version>1.1.0.0</Version>
<ProviderName>MyCompany AB</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="MyCompany Test"/>
<Description DefaultValue="Sign agreements online with MyCompany"/>
<IconUrl DefaultValue="https://testbed-office-addin.scrive.com/public/assets/icon-32.png"/>
<HighResolutionIconUrl DefaultValue="https://testbed-office-addin.scrive.com/public/assets/icon-80.png"/>
<SupportUrl DefaultValue="https://support.scrive.com/"/>
<AppDomains>
<AppDomain>scrive.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Workbook"/>
<Host Name="Document"/>
<Host Name="Presentation"/>
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://testbed-office-addin.scrive.com/public"/>
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Description resid="Version.Description" />
<Hosts>
<Host xsi:type="Workbook">
<DesktopFormFactor>
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<CustomTab id="MyCompanyTab">
<Group id="MyCompanyCommands">
<Label resid="CommandsGroup.Label"/>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Control xsi:type="Button" id="MyCompanyTaskpaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url"/>
<Title resid="TaskpaneButton.Label"/>
</Action>
</Control>
</Group>
<Label resid="CustomTab.Label"/>
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
<Host xsi:type="Document">
<DesktopFormFactor>
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<CustomTab id="MyCompanyTab">
<Group id="MyCompanyCommands">
<Label resid="CommandsGroup.Label"/>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Control xsi:type="Button" id="MyCompanyTaskpaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
</Group>
<Label resid="CustomTab.Label"/>
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
<Host xsi:type="Presentation">
<DesktopFormFactor>
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<CustomTab id="MyCompanyTab">
<Group id="MyCompanyCommands">
<Label resid="CommandsGroup.Label"/>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Control xsi:type="Button" id="MyCompanyTaskpaneButton">
<Label resid="TaskpaneButton.Label"/>
<Supertip>
<Title resid="TaskpaneButton.Label"/>
<Description resid="TaskpaneButton.Tooltip"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Icon.16x16"/>
<bt:Image size="32" resid="Icon.32x32"/>
<bt:Image size="80" resid="Icon.80x80"/>
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="Taskpane.Url"/>
</Action>
</Control>
</Group>
<Label resid="CustomTab.Label"/>
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Icon.16x16" DefaultValue="https://testbed-office-addin.scrive.com/public/assets/icon-16.png"/>
<bt:Image id="Icon.32x32" DefaultValue="https://testbed-office-addin.scrive.com/public/assets/icon-32.png"/>
<bt:Image id="Icon.80x80" DefaultValue="https://testbed-office-addin.scrive.com/public/assets/icon-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://www.scrive.com/products/"/>
<bt:Url id="Taskpane.Url" DefaultValue="https://testbed-office-addin.scrive.com/public/index.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="Version.Description" DefaultValue="Sign agreements online with MyCompany"/>
<bt:String id="GetStarted.Title" DefaultValue="Get started with MyCompany Test!"/>
<bt:String id="CommandsGroup.Label" DefaultValue="MyCompany"/>
<bt:String id="CustomTab.Label" DefaultValue="MyCompany Test"/>
<bt:String id="TaskpaneButton.Label" DefaultValue="MyCompany Test"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="GetStarted.Description" DefaultValue="MyCompany Test loaded successfully. Go to the MyCompany Test tab and click the 'MyCompany Test' button to get started."/>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Click to show MyCompany Test configuration"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>

额外排查建议

  • 修复后,记得重新部署manifest并重启桌面版PowerPoint/Excel测试
  • 可以用Office的Manifest Validator工具检查文件是否符合规范,避免类似节点顺序或语法问题
  • 如果问题仍存在,清空Office缓存后再重试:
    • 打开命令提示符,执行del /s /q %LOCALAPPDATA%\Microsoft\Office\16.0\Wef\*
    • 重启Office应用

内容的提问来源于stack exchange,提问作者Clara Attermo

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 22:22:31