I have an Excel 2016 taskpane add-in written which worked flawlessly both online and on desktop. However, now that I am trying to convert it into a command add-in, I have stumbled accross a really odd deployment issue concerning this manifest:
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:325c27b6-9566-4641-a1c6-175f0039f620-->
<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"
>
<!--BasicSettings-->
<Id>bcb30953-453a-4cbb-93c3-f3d289de0ee3</Id>
<Version>1.1.5.6</Version>
<ProviderName>My Corporation</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="MyAddin" />
<Description DefaultValue="My addin's description"/>
<IconUrl DefaultValue="https://i.imgur.com/MPuvMiq.png" />
<HighResolutionIconUrl DefaultValue="https://i.imgur.com/MPuvMiq.png" />
<SupportUrl DefaultValue="https://google.com" />
<!-- http://dev.office.com/reference/add-ins/office-add-in-requirement-sets -->
<Permissions>ReadWriteDocument</Permissions>
<!--EndBasicSettings-->
<!--BeginTaskpaneMode-->
<Hosts>
<Host Name="Workbook" />
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://odsample.azurewebsites.net/Pages/Home.aspx" />
</DefaultSettings>
<!--EndTaskpaneMode-->
<!--BeginAddinCommandsMode-->
<!-- https://github.com/OfficeDev/Office-Add-in-Commands-Samples/blob/master/Tools/XSD/TaskPaneAppVersionOverridesV1_0.xsd -->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Description resid="MyAddin.Description" />
<Hosts>
<Host xsi:type="Workbook">
<DesktopFormFactor>
<GetStarted>
<Title resid="MyAddin.Title"/>
<Description resid="MyAddin.Description"/>
<LearnMoreUrl resid="MyAddin.LearnMore"/>
</GetStarted>
<FunctionFile resid="MyAddin.FunctionFile" />
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<CustomTab id="MyAddin" >
<Group id="MyAddin.Tab1.Group1">
<Label resid="MyAddin.Tab1.Group1.Label" />
<Icon>
<bt:Image size="16" resid="MyAddin.Tab1.Group1.Icon.16" />
<bt:Image size="32" resid="MyAddin.Tab1.Group1.Icon.32" />
<bt:Image size="80" resid="MyAddin.Tab1.Group1.Icon.80" />
</Icon>
<Control xsi:type="Button" id="MyAddin.Tab1.Group1.RunFunctionButton">
<Label resid="MyAddin.Tab1.Group1.RunFunctionButton.Label" />
<Supertip>
<Title resid="MyAddin.Tab1.Group1.RunFunctionButton.Title" />
<Description resid="MyAddin.Tab1.Group1.RunFunctionButton.Description" />
</Supertip>
<Icon>
<bt:Image size="16" resid="MyAddin.Tab1.Group1.RunFunctionButton.Icon.16" />
<bt:Image size="32" resid="MyAddin.Tab1.Group1.RunFunctionButton.Icon.32" />
<bt:Image size="80" resid="MyAddin.Tab1.Group1.RunFunctionButton.Icon.80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>writeText</FunctionName>
</Action>
</Control>
</Group>
<Label resid="MyAddin.Tab1.Label"/><!-- order is important-->
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="MyAddin.Tab1.Group1.Icon.16" DefaultValue="https://i.imgur.com/FkSShX9.png" />
<bt:Image id="MyAddin.Tab1.Group1.Icon.32" DefaultValue="https://i.imgur.com/FkSShX9.png" />
<bt:Image id="MyAddin.Tab1.Group1.Icon.80" DefaultValue="https://i.imgur.com/FkSShX9.png" />
<bt:Image id="MyAddin.Tab1.Group1.RunFunctionButton.Icon.16" DefaultValue="https://i.imgur.com/qDujiX0.png" />
<bt:Image id="MyAddin.Tab1.Group1.RunFunctionButton.Icon.32" DefaultValue="https://i.imgur.com/qDujiX0.png" />
<bt:Image id="MyAddin.Tab1.Group1.RunFunctionButton.Icon.80" DefaultValue="https://i.imgur.com/qDujiX0.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="MyAddin.LearnMore" DefaultValue="https://commandsimple.azurewebsites.net/FunctionFile.html" />
<bt:Url id="MyAddin.FunctionFile" DefaultValue="https://commandsimple.azurewebsites.net/FunctionFile.html" />
</bt:Urls>
<bt:ShortStrings>
<bt:String id="MyAddin.Title" DefaultValue="MyAddin" />
<bt:String id="MyAddin.Tab1.Label" DefaultValue="MyAddin" />
<bt:String id="MyAddin.Tab1.Group1.Label" DefaultValue="Execute Function" />
<bt:String id="MyAddin.Tab1.Group1.RunFunctionButton.Label" DefaultValue="Execute Function" />
<bt:String id="MyAddin.Tab1.Group1.RunFunctionButton.Title" DefaultValue="Execute Function" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="MyAddin.Description" DefaultValue="MyAddin's description" />
<bt:String id="MyAddin.Tab1.Group1.RunFunctionButton.Description" DefaultValue="Click to Execute Function" />
</bt:LongStrings>
</Resources>
</VersionOverrides>
<!--EndAddinCommandsMode-->
</OfficeApp>
, which is mostly based on the official command addin example. This manifest, as it is, can be perfectly imported on Excel Online for testing and shows the expected commands group on the ribbon. However, it fails to be imported on the desktop version of Excel, since no addin at all is shown after clicking on 'Insert'=>'My Addins'=>'Shared folder' (where I store the manifests for testing purposes), which to my current understanding is due to some kind of failed validation.
After long hours of trial and error, I am pretty sure the xml namespaces and schema definitions are to be blamed. However, I am still struggling.
I have checked that if I change <VersionOverrides> to <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"> (note the extra trailing /1.0), then I can deploy the manifest both online and on desktop, but then they both fallback to the taskpane version (which as far as I understand is due to the fact of the <VersionOverrides> part being omited because of malformation.
In a similar question, where the problem lay on the declaration of the namespaces being uncompleted, the accepted answer opted for using <OfficeApp xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0> (note the extra /1.0) and`. When using this configuration, I get the add-in to work as expected online (command add-in) but fails to even load on desktop.
Likewise, I am sure this is not a version problem, and thereby this question does not apply, since I am running Version: 16.0.7070.2033, which theoretically meets the requirements.
As I said, I am really struggling to work out how to solve this issue. So, any help will be utterly appreciated (I am so tired I am problably missing something obvious). Thanks
There seems to be a limit on the length of the id attribute that can be used. Sticking to 32-character strings solved the problem for me.
Related
I am working on office addin where I have added a control on a custom tab. but the control does not show the Icon image specified instead it shows default icon.
So how can we show the icon specified for each control in ribbon ?
Reffered link: link
Following is the ribbon image showing default icon :
Manifest.xml file:
<?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>81d7e91a-c8e6-454f-806a-9b84cf3e7dd5</Id>
<Version>1.0.0.0</Version>
<ProviderName>Contoso</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Add-in"/>
<Description DefaultValue="A template to get started."/>
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/>
<SupportUrl DefaultValue="https://www.contoso.com/help"/>
<AppDomains>
<AppDomain>https://www.contoso.com</AppDomain>
</AppDomains>
<Hosts>
<Host Name="Workbook"/>
</Hosts>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/>
</DefaultSettings>
<Permissions>ReadWriteDocument</Permissions>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/taskpaneappversionoverrides" xsi:type="VersionOverridesV1_0">
<Hosts>
<Host xsi:type="Workbook">
<DesktopFormFactor>
<FunctionFile resid="Commands.Url"/>
<ExtensionPoint xsi:type="PrimaryCommandSurface">
<CustomTab id="CustomTab">
<Label resid="ribbonNameLabel" />
<Group id="AuthGroup">
<Label resid="AuthGroupNameLabel" />
<Icon>
<bt:Image size="16" resid="Group1LoginIcon16" />
<bt:Image size="32" resid="Group1LoginIcon32" />
<bt:Image size="80" resid="Group1LoginIcon80" />
</Icon>
<Control xsi:type="Button" id="LoginControl">
<Label resid="LoginButtonLabel" />
<Supertip>
<Title resid="LoginButtonToolTipTitle" />
<Description resid="LoginButtonToolTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="Group1LoginIcon16" />
<bt:Image size="32" resid="Group1LoginIcon32" />
<bt:Image size="80" resid="Group1LoginIcon80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>LoginPanelId</TaskpaneId>
<Title resid="LoginTaskPaneTitle" />
<SourceLocation resid="LoginTaskPaneUrl" />
</Action>
</Control>
</Group>
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="Group1LoginIcon16" DefaultValue="https://localhost:3000/assets/icon-16.png"/>
<bt:Image id="Group1LoginIcon32" DefaultValue="https://localhost:3000/assets/icon-32.png"/>
<bt:Image id="Group1LoginIcon80" DefaultValue="https://localhost:3000/assets/icon-64.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="Commands.Url" DefaultValue="https://localhost:3000/commands.html"/>
<bt:Url id="LoginTaskPaneUrl" DefaultValue="https://localhost:3000/taskpane.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="ribbonNameLabel" DefaultValue="Add-in"/>
<bt:String id="AuthGroupNameLabel" DefaultValue="Auth"/>
<bt:String id="LoginButtonLabel" DefaultValue="Login" />
<bt:String id="LoginTaskPaneTitle" DefaultValue="Login" />
<bt:String id="LoginButtonToolTipTitle" DefaultValue="Tooltip Title" />
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="LoginButtonToolTipDescription" DefaultValue="Tooltip Description" />
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
Environment:
Any help will be appreciated.
Thanks
First of all, make sure that all icons are accessible by navigating to the URL specified in the manifest. If you don't see the icon then make it accessible.
Second, make sure no ribbon UI errors are shown in Excel. By default, if an add-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom ribbon does not appear, or why a ribbon appears but no controls appear.
Start the application.
Click the File tab.
Click Options.
In the categories pane, click Advanced.
In the details pane, select Show VSTO Add-in user interface errors, and then click OK.
Third, try to Clear the Office cache if your new images are not displayed.
I have created excel add-ins using office.js and react-fabric UI. I have created manifest and validated using command: npx --ignore-existing office-addin-manifest validate manifest.xml
And it looks good with no issue. When I am uploading manifest in desktop excel, it showing below error on excel. Although its not blocking any add ins functionality but it giving wrong impression to user. PFA SS of error: "Error loading add-ins"
On click of Ribbon buttons its working as expected but on excel bottom it showing error on manifest load.
PSB is my manifest file and please help to identify the cause of this error as we need to release application to our customer but because of this error its causing blocker for our releasae.
<?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">
<!-- 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>565764A6-0F6E-4D98-A1EF-39B86F13D169</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>Office Developer Education Team.</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="Contoso Data Importer" />
<Description DefaultValue="Get started with extracting your data. Add in a dataset to your workbook."/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://localhost:8060/assests/icon-32.png" />
<HighResolutionIconUrl DefaultValue="https://localhost:8060/assests/icon-32.png"/>
<!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
<!--<SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]">-->
<!-- 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. -->
<!-- <SupportUrl DefaultValue="https://www.contoso.com/help"/> -->
<AppDomains>
<AppDomain>https://localhost:8060</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>
<Requirements>
<Sets DefaultMinVersion="1.1">
<Set Name="SharedRuntime" MinVersion="1.1"/>
</Sets>
</Requirements>
<DefaultSettings>
<SourceLocation DefaultValue="https://localhost:8060/#/index.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">
<Runtimes>
<Runtime resid="ContosoAddin.Url" lifetime="long" />
</Runtimes>
<AllFormFactors>
<ExtensionPoint xsi:type="CustomFunctions">
<Script>
<SourceLocation resid="ContosoAddin.Url"/>
</Script>
<Page>
<SourceLocation resid="ContosoAddin.Url"/>
</Page>
<Metadata>
<SourceLocation resid="ContosoAddin.Url"/>
</Metadata>
<Namespace resid="Functions.Namespace"/>
</ExtensionPoint>
</AllFormFactors>
<!-- 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="GetStarted.Title"/>
<!-- Description of the Getting Started callout. resid points to a LongString resource -->
<Description resid="GetStarted.Description"/>
<!-- Point to a url resource which details how the add-in should be used. -->
<LearnMoreUrl resid="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="ContosoAddin.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. -->
<CustomTab id="ShareTime">
<Group id="LoginGroup">
<Label resid="LoginGroup.Label"/>
<Icon>
<bt:Image size="16" resid="LGButton.Icon"/>
<bt:Image size="32" resid="LGButton.Icon"/>
<bt:Image size="80" resid="LGButton.Icon"/>
</Icon>
<Control xsi:type="Button" id="BtnLoginService">
<Label resid="BtnLoginService.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="BtnLoginService.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="BtnLoginService.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="LGButton.Icon"/>
<bt:Image size="32" resid="LGButton.Icon"/>
<bt:Image size="80" resid="LGButton.Icon"/>
</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="ExecuteFunction">
<FunctionName>btnloginservice</FunctionName>
</Action>
</Control>
<Control xsi:type="Button" id="BtnLogoutService">
<Label resid="BtnLogoutService.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="BtnLogoutService.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="BtnLogoutService.Tooltip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="SignOutButton.Icon"/>
<bt:Image size="32" resid="SignOutButton.Icon"/>
<bt:Image size="80" resid="SignOutButton.Icon"/>
</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="ExecuteFunction">
<FunctionName>btnlogoutservice</FunctionName>
</Action>
<Enabled>false</Enabled>
</Control>
</Group>
<Label resid="CommandsGroup.Label"/>
</CustomTab>
</ExtensionPoint>
</DesktopFormFactor>
</Host>
</Hosts>
<!-- You can use resources across hosts and form factors. -->
<Resources>
<bt:Images>
<bt:Image id="LGButton.Icon" DefaultValue="https://localhost:8060/assests/log_in.png" />
<bt:Image id="SignOutButton.Icon" DefaultValue="https://localhost:8060/assests/log_out.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="ContosoAddin.Url" DefaultValue="https://localhost:8060/#/index.html"/>
<bt:Url id="LGButton.Url" DefaultValue="https://localhost:8060/#/login" />
<bt:Url id="GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
</bt:Urls>
<!-- ShortStrings max characters==125. -->
<bt:ShortStrings>
<bt:String id="GetStarted.Title" DefaultValue="Contoso Data Importer add-in has loaded successfully." />
<bt:String id="Functions.Namespace" DefaultValue="CONTOSO"/>
<bt:String id="BtnLoginService.Label" DefaultValue="Sign in"/>
<bt:String id="BtnLogoutService.Label" DefaultValue="Sign out"/>
<bt:String id='StartupGroup.Label' DefaultValue='Contoso Data Importer Services'/>
<bt:String id='LoginGroup.Label' DefaultValue='Authentication'/>
<bt:String id='FeedbackGroup.Label' DefaultValue='Let us know'/>
<bt:String id="CommandsGroup.Label" DefaultValue="CONTOSO DATA"/>
</bt:ShortStrings>
<!-- LongStrings max characters==250. -->
<bt:LongStrings>
<bt:String id="TaskpaneButton.Tooltip" DefaultValue="Get files stored on OneDrive" />
<bt:String id="GetStarted.Description" DefaultValue="Get going by opening CONTOSO importer TAB on the Ribbon." />
<bt:String id="BtnLoginService.Tooltip" DefaultValue="Please sign in "/>
<bt:String id="BtnLogoutService.Tooltip" DefaultValue="Please sign out"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
<!-- End Add-in Commands Mode integration. -->
</OfficeApp>
By commenting below tag from manifest file that manifest upload error is resolved.
<!-- <AllFormFactors>
<ExtensionPoint xsi:type="CustomFunctions">
<Script>
<SourceLocation resid="ContosoAddin.Url"/>
</Script>
<Page>
<SourceLocation resid="ContosoAddin.Url"/>
</Page>
<Metadata>
<SourceLocation resid="ContosoAddin.Url"/>
</Metadata>
<Namespace resid="Functions.Namespace"/>
</ExtensionPoint>
</AllFormFactors> -->
I am making an Office add-in which has two ribbon buttons. Each button is linked to a different TaskpaneId, and clicking on each button opens a different taskpane:
<bt:Urls>
<bt:Url id="Contoso.Taskpane1.Url" DefaultValue="https://localhost:3000/addin/page1" />
<bt:Url id="Contoso.Taskpane2.Url" DefaultValue="https://localhost:3000/addin/page2" />
</bt:Urls>
It seems that I have seen some Office Add-ins where two task panes can be shown side by side simultaneously (I forgot which exactly the add-ins are). I need this from time to time, does anyone know how to realise this?
Script Lab is one such add-in. All you need to do is create two different buttons that have a ShowTaskpane action with different IDs.
Example from Script Lab's prod manifest: https://github.com/OfficeDev/script-lab/blob/master/manifests/script-lab-prod.xml
<Control xsi:type="Button" id="PG.CodeCommand">
<Label resid="PG.CodeCommand.Label" />
<Supertip>
<Title resid="PG.CodeCommand.TipTitle" />
<Description resid="PG.CodeSupertip.Desc" />
</Supertip>
<Icon>
<bt:Image size="16" resid="PG.Icon.Code.16" />
<bt:Image size="32" resid="PG.Icon.Code.32" />
<bt:Image size="80" resid="PG.Icon.Code.80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<TaskpaneId>Office.AutoShowTaskpaneWithDocument</TaskpaneId>
<===== A taskpane ID. This one is a "special" one that allows the taskpane
to auto-open if a document is marked as belonging to the add-in.
<SourceLocation resid="PG.Code.Url" />
<Title resid="PG.CodeCommand.Title" />
</Action>
</Control>
<Control xsi:type="Button" id="PG.RunCommand">
<Label resid="PG.RunCommand.Label" />
<Supertip>
<Title resid="PG.RunCommand.TipTitle" />
<Description resid="PG.RunSupertip.Desc" />
</Supertip>
<Icon>
<bt:Image size="16" resid="PG.Icon.Run.16" />
<bt:Image size="32" resid="PG.Icon.Run.32" />
<bt:Image size="80" resid="PG.Icon.Run.80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<===== Whereas this one dosn't specify a taskpane ID,
and so it is different by default (but probably
should be explicit, come to think of it...)
<SourceLocation resid="PG.Run.Url" />
<Title resid="PG.RunCommand.Title" />
</Action>
</Control>
For the auto-open in particular, see https://dev.office.com/docs/add-ins/design/automatically-open-a-task-pane-with-a-document.
I created an Office.js addin successfully using these steps.
On Mac Sierra, Excel 2016 version 15.31 (170216)
Then i created another addin using the same method, but gave it a different name and folder. Also gave it's manifest a new GUID.
I sideloaded both, using wef folder.
Now, when i open Excel, i see both addins listed by their unique names in the Insert ribbon, but their task panes both display the same name (the first addin). How to fix?
Also, seems even if i stop the first web server, i still see both addins listed on Insert ribbon. How to fix?
QuarterlySalesReport manifest:
<?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">
<!-- 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>3d7e3ffe-a5c5-451f-b2af-50ac7c2b49e2</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="QuarterlySalesReport" />
<Description DefaultValue="[Workbook Add-in description]"/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png" />
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/hi-res-icon.png"/>
<!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
<!--<SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]">-->
<!-- 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="https://localhost:3000/index.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. resid 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"/>
<!-- Point 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="Contoso.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="Contoso.Group1">
<!-- Label for your group. resid must point to a ShortString resource. -->
<Label resid="Contoso.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="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
</Icon>
<!-- Control. It can be of type "Button" or "Menu". -->
<Control xsi:type="Button" id="Contoso.TaskpaneButton">
<Label resid="Contoso.TaskpaneButton.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="Contoso.TaskpaneButton.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="Contoso.TaskpaneButton.Tooltip" />
</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>
<!-- 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="Contoso.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="Contoso.tpicon_16x16" DefaultValue="https://localhost:3000/assets/icon-16.png" />
<bt:Image id="Contoso.tpicon_32x32" DefaultValue="https://localhost:3000/assets/icon-32.png" />
<bt:Image id="Contoso.tpicon_80x80" DefaultValue="https://localhost:3000/assets/icon-80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Contoso.Taskpane.Url" DefaultValue="https://localhost:3000/index.html" />
<bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
<bt:Url id="Contoso.DesktopFunctionFile.Url" DefaultValue="https://localhost:3000/function-file/function-file.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: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>
myHelloWorldaddin manifest:
<?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">
<!-- 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>f30dc80e-a3b9-409d-9035-6f8448560e35</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="myHelloWorldaddin" />
<Description DefaultValue="[Workbook Add-in description]"/>
<!-- Icon for your add-in. Used on installation screens and the add-ins dialog. -->
<IconUrl DefaultValue="https://localhost:3000/assets/icon-32.png" />
<HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/hi-res-icon.png"/>
<!--If you plan to submit this add-in to the Office Store, uncomment the SupportUrl element below-->
<!--<SupportUrl DefaultValue="[Insert the URL of a page that provides support information for the app]">-->
<!-- 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="https://localhost:3000/index.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. resid 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"/>
<!-- Point 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="Contoso.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="Contoso.Group1">
<!-- Label for your group. resid must point to a ShortString resource. -->
<Label resid="Contoso.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="Contoso.tpicon_16x16" />
<bt:Image size="32" resid="Contoso.tpicon_32x32" />
<bt:Image size="80" resid="Contoso.tpicon_80x80" />
</Icon>
<!-- Control. It can be of type "Button" or "Menu". -->
<Control xsi:type="Button" id="Contoso.TaskpaneButton">
<Label resid="Contoso.TaskpaneButton.Label" />
<Supertip>
<!-- ToolTip title. resid must point to a ShortString resource. -->
<Title resid="Contoso.TaskpaneButton.Label" />
<!-- ToolTip description. resid must point to a LongString resource. -->
<Description resid="Contoso.TaskpaneButton.Tooltip" />
</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>
<!-- 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="Contoso.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="Contoso.tpicon_16x16" DefaultValue="https://localhost:3000/assets/icon-16.png" />
<bt:Image id="Contoso.tpicon_32x32" DefaultValue="https://localhost:3000/assets/icon-32.png" />
<bt:Image id="Contoso.tpicon_80x80" DefaultValue="https://localhost:3000/assets/icon-80.png" />
</bt:Images>
<bt:Urls>
<bt:Url id="Contoso.Taskpane.Url" DefaultValue="https://localhost:3000/index.html" />
<bt:Url id="Contoso.GetStarted.LearnMoreUrl" DefaultValue="https://go.microsoft.com/fwlink/?LinkId=276812" />
<bt:Url id="Contoso.DesktopFunctionFile.Url" DefaultValue="https://localhost:3000/function-file/function-file.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: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>
Fix: To configure two proxy servers in browsersync bsconfig.json
add "port": port_number_1 and "port": port_number_2 to your bsconfig.json in two projects.
Make sure to change elements in your manifest file to use the correct port you added in bsconfig. e.g. iconUrl, image defaultvalue etc.
Note that your add-ins will always show up on 'Insert' ribbon under 'My Add-ins' regardless if web server is started or not. It reflects manifest files added to wef folder.
We are trying to publish our app to the office store but can not pass the following condition.
Your add-in must use add-in commands since it triggers on all messages or all appointments. Add-in commands have been introduced as they lead to a better, much more discoverable, native and engaging experience To find out how to implement add-in commands, please see this article: https://msdn.microsoft.com/EN-US/library/office/mt267547.aspx
We have a really simple manifest that is provided below. The addin works nice in the webbrowsers but in outlook on windows/desktop the command does not load. We have tried to trace the http-traffic but cant see any calls to our website so my guess is that we have som kind of error in our manifest? Any suggestions in how to debug this and see any errors?
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using transformations
see the web.config examples at http://go.microsoft.com/fwlink/?LinkId=214134. -->
<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:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
xsi:type="MailApp">
<Id>guid</Id>
<Version>1.0.0.0</Version>
<ProviderName>CompanyName</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Display Name Test"/>
<Description DefaultValue="Description"/>
<IconUrl DefaultValue="[URL]App%2064x64.png" />
<HighResolutionIconUrl DefaultValue="[URL]App%20128x128.png" />
<SupportUrl DefaultValue="[URL]" />
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<!-- These elements support older clients that don't support add-in commands -->
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="[URL]"/>
<RequestedHeight>450</RequestedHeight>
</DesktopSettings>
<TabletSettings>
<SourceLocation DefaultValue="[URL]"/>
<RequestedHeight>450</RequestedHeight>
</TabletSettings>
<PhoneSettings>
<SourceLocation DefaultValue="[URL]"/>
</PhoneSettings>
</Form>
<Form xsi:type="ItemEdit">
<DesktopSettings>
<SourceLocation DefaultValue="[URL]"/>
</DesktopSettings>
<TabletSettings>
<SourceLocation DefaultValue="[URL]"/>
</TabletSettings>
<PhoneSettings>
<SourceLocation DefaultValue="[URL]"/>
</PhoneSettings>
</Form>
</FormSettings>
<Permissions>ReadWriteMailbox</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Edit" />
<Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Edit" />
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
<Rule xsi:type="ItemIs" ItemType="Appointment" FormType="Read" />
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="functionFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="AppointmentOrganizerCommandSurface">
<!-- Use the default tab of the ExtensionPoint or create your own with <CustomTab id="myTab"> -->
<OfficeTab id="TabDefault">
<!-- Up to 6 Groups added per Tab -->
<Group id="apptComposeDemoGroup">
<Label resid="groupLabel" />
<!-- Launch the add-in : task pane button -->
<Control xsi:type="Button" id="apptComposeFunctionButton">
<Label resid="funcComposeButtonLabel" />
<Supertip>
<Title resid="funcComposeSuperTipTitle" />
<Description resid="funcComposeSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon16" />
<bt:Image size="32" resid="icon32" />
<bt:Image size="80" resid="icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>commandFunction</FunctionName>
</Action>
</Control>
<!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="icon16" DefaultValue="[URL]App16x16.png"/>
<bt:Image id="icon32" DefaultValue="[URL]App32x32.png"/>
<bt:Image id="icon80" DefaultValue="[URL]App80x80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="functionFile" DefaultValue="[URL]"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="My Add-in Group"/>
<bt:String id="funcComposeButtonLabel" DefaultValue="Test"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Opens a pane displaying all available properties. This is an example of a button that opens a task pane."/>
<bt:String id="funcComposeSuperTipTitle" DefaultValue="Test2"/>
<bt:String id="funcComposeSuperTipDescription" DefaultValue="Test3"/>
</bt:LongStrings>
</Resources>
</VersionOverrides>
</OfficeApp>
For your Supertip Title, use a resource string from ShortStrings instead of LongStrings. I tried that on my Outlook client and it works for me.
So I changed this line:
<Title resid="funcComposeSuperTipTitle" />
to:
<Title resid="funcComposeButtonLabel" />
And then I went to my Calendar, clicked on "New Appointment", and your add-in shows up in my ribbon.
Add-in commands currently only work in Outlook 2016 and 2013 (with the March 8, 2016 Security Update). If you are testing with those versions, note that if the user selects an item in the calendar but doesn't open the pop-out, the add-in's ribbon group won't be visible in the ribbon.
See: https://dev.office.com/docs/add-ins/outlook/add-in-commands-for-outlook