'CustomTab crashes Add-In
I'm trying out Excel add-ins and try to get a custom ribbon going where I can organize different functions I want to deploy inside my organisation. I've been following a tutorial project what works, tried to change some logic. Now I'm at the point that I want to put my functions in a custom tab to keep the overview and easy access. Once I tried to change that in the manifest, I always get an error in Excel once I run the add-in code without any further explenation, see image: 
The manifest I currently have is as following:
<?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>8da524bf-5dac-4b65-9194-0347541b9c11</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>[Provider 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="HBUrenverwerking" />
<Description DefaultValue="HBUrenverwerking"/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="~remoteAppUrl/Images/Button32x32.png" />
<SupportUrl DefaultValue="http://www.contoso.com" />
<!-- 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="Workbook" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="~remoteAppUrl/Home.html" />
</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="Workbook">
<!-- 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. 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 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="Urentaken.HubbaseInternFFUrl" />
<!-- PrimaryCommandSurface is the main Office Ribbon. -->
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<!-- Speciale tab voor automatiseren taken hubbase. -->
<CustomTab id="Hubbase.HubbaseIntern">
<!-- Groep met betrekking tot het verweken van gemaakte uren en doorsturen naar klanten van Hubbase -->
<Group id="Hubbase.HubbaseIntern.Urentaken">
<Label resid="Urentaken.GroupUrenverwerkingLbl" />
<Icon>
<bt:Image size="16" resid="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
</Icon>
<Control xsi:type="Button" id="Hubbase.HubbaseIntern.Urentaken.FormateerUren">
<Label resid="Urentaken.ButtonFormatUrenLbl" />
<Supertip>
<Title resid="Urentaken.ButtonFormatUrenTitle"/>
<Description resid="Urentaken.ButtonFormatUrenDesc"/>
</Supertip>
<Icon>
<bt:Image size="16" resid="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>formatUren</FunctionName>
</Action>
</Control>
<!-- <Control xsi:type="Button" id="Hubbase.HubbaseIntern.Urentaken.FormateerUren"> -->
</Group>
<!-- <Group id="Hubbase.HubbaseIntern.Urentaken"> -->
<Label resid="HubbaseIntern.CustomTabLbl" />
</CustomTab>
<!-- <CustomTab id="Hubbase.HubbaseIntern"> -->
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<!-- You can use resources across hosts and form factors. -->
<Resources>
<bt:Images>
<bt:Image id="Contoso.tpicon_16x16" DefaultValue="~remoteAppUrl/Images/Button16x16.png" />
<bt:Image id="Contoso.tpicon_32x32" DefaultValue="~remoteAppUrl/Images/Button32x32.png" />
<bt:Image id="Contoso.tpicon_80x80" DefaultValue="~remoteAppUrl/Images/Button80x80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Contoso.DesktopFunctionFile.Url" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html" />
<bt:Url id="Contoso.Taskpane.Url" DefaultValue="~remoteAppUrl/Home.html" />
<bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
<bt:Url id="Urentaken.HubbaseInternFFUrl" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="Contoso.TaskpaneButton.Label" DefaultValue="Show Taskpane" />
<bt:String id="Contoso.Group1Label" DefaultValue="Commands Group" />
<bt:String id="Contoso.GetStarted.Title" DefaultValue="Get started with your sample add-in!" />
<bt:String id="HubbaseIntern.CustomTabLbl" DefaultValue="Hubbase intern" />
<bt:String id="Urentaken.GroupUrenverwerkingLbl" DefaultValue="Urenverwerking"/>
<bt:String id="Urentaken.ButtonFormatUrenLbl" DefaultValue="Formateer uren"/>
<bt:String id="Urentaken.ButtonFormatUrenTitle" DefaultValue="Formateren van database uren"/>
<bt:String id="UrenTaken.ButtonFormatUrenDesc" DefaultValue="Het formateren van de uren direct uitgelezen van een database, naar een leesbare Nederlandse standaard" />
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="Contoso.TaskpaneButton.Tooltip" DefaultValue="Click to Show a Taskpane" />
<bt:String id="Contoso.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>
I've also tried some manifests I've found around the internet with custom tabs, which all seem to error no matter what I try. I reckon the problem is in the manifest, since the code seems to work when I put it in a OfficeTab or taskPane. Any help is appreciated!
Solution 1:[1]
Clearing the Office cache often fixes issues related to stale code. This guarantees the latest manifest is uploaded, using the current file names, menu text, and other command elements. To learn more, see Clear the Office cache.
If you're using Office on the web, clear your browser's cache through the browser's UI.
See Validate an Office Add-in's manifest and Debug your add-in with runtime logging to debug add-in manifest issues.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Eugene Astafiev |
