Load an Office add-in or its add-in command by default - ms-office

I take Excel for example. At the moment, every time when a user wants to use an add-in, they need to go to insert ==> add-ins and choose the add-in. Then either a take pane or content add-in appears. If the manifest xml of the add-in has add-in commands, users can launch the add-in via menu or ribbon.
If the user des-actives the task pane, closes and re-open Excel, they need to go to insert ==> add-ins again and so on... It is tedious.
Is it possible to set an add-in loaded by default (either by developers or users)? For example, each time the user opens Excel, they could see the item in the menu or ribbon (or even the task pane activated) to launch the add-in.

Unfortunately users have to always manually activate the add-in, either from a Ribbon command or from the Add-ins button. Only COM add-ins allow you to display a Task Pane when the Office application opens.

While the ribbon-button feature mentioned by SoftTimur and Eric is one solution to the problem, another potential solution (depending on your business model) may be to use a template:
You can create a .xlsx document and insert your add-in task pane manually, then share that document with others, who will automatically see the open task pane when they open that document. One strategy is to post this template document online and provide links to it elsewhere.

Related

How to automatically show task pane for non-function add-in when opening worksheet?

How can we tell Excel (Web and Desktop) to load but not show an add-in automatically when a workbook is opened? We want code in the add-in to check the worksheet and, if our add-in has been used on it, open the add-in task pane automatically (though we'll give the user an opt-out of the behavior).
(The add-in is just a task pane, not custom functions.)
If you haven't already done that, I would recommed taking a look at the options for running code in your Office add-in when the document opens. From that page:
Configure your add-in to load when the document opens
The following code configures your add-in to load and start running when the document is opened.
Office.addin.setStartupBehavior(Office.StartupBehavior.load);
...
Place startup code in Office.initialize
When your add-in is configured to load on document open, it will run immediately. The Office.initialize event handler will be called. Place your startup code in the Office.initialize or Office.onReady event handler.

Close open Desktop Taskpane using office.js or Add-in manifest function

We have created add-in manifest xml file for our application and also embed office.js file.
We have use custom ribbon feature by assigning url to icon. When we click on icon, it open task pane on desktop. We want to open third party url in new window of browser using Add-in manifest and taskpane should be close.
We have gone through AppDomains and uses Office.addin.hide function. But both solutions are not working.
Please provide us solution if exist.
Office.js doesn't provide anything for opening a new tab in a web browser. Instead, you can display a popup message. In Excel, you can use the following code to hide the task pane:
Office.addin.hide();
For example:
function onCurrentQuarterDeactivated() {
Office.addin.hide();
}
See Show or hide an Office Add-in in a shared runtime for more information.
You may try to use UI less function, in UI less function, you could execute a javascript code to open a page in the default browser.
You could refer to this answer.
Open directly a web page from a button in Ribbon in a browser outside Excel?

How to show Taskpane selected data in ribbon command using officejs

We are populating list of users in dropdown list Task pane UI. When we are selecting the user in the list we were able to show selected user in taskpane itself.
Also we wanted to show the selected user in ribbon command Menu like in attached screen shot.
The screen shot which took from Excel DNA with .net application the same wanted to achieve in Excel add-in using OfficeJS.
The Fluent UI extensibility level leaves much to be a desire for Web add-ins. See Add-in commands for Excel, PowerPoint, and Word for more information.
If you need to implement dynamic ribbon customizations you need to consider developing a VSTO based add-in instead.
this feature is not yet available with add-in commands. One capability we just announced on the community call was "contextual tabs api". This will be available soon for public preview where you will be able to test it. Please stay tuned for our next community call for an update.

Custom Ribbon tab missing in Excel

I tried searching for this question but couldn't really find a similar problem.
I have an excel file in which I created a custom ribbon tab and made copies of this file.
Image of the tab
In some of those copies, the tab has gone missing. I was earlier using Excel 2016 and recently migrated to Microsoft 365 and downloaded the latest version of Office. I am not sure if this is causing the problem since some files do still have the custom ribbon.
Thanks a lot for your help in advance.
Regards
Do you get any UI errors when the tab is missed?
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.
To show VSTO Add-in user interface errors you need:
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.
If you deal with documents with embedded customizations, make sure the protected mode is off when the document is opened. See What is Protected View? for more information.

Office Web App - Show task pane on load

How do I show a custom taskpane automatically when the add-in loads (i.e. without having to click a command that is tied to that URL)?
Jan 2018 update:
Office has shipped a new feature which lets you configure your add-in to automatically open a task pane when the file loads if the add-in had been used there previously: https://learn.microsoft.com/en-us/office/dev/add-ins/design/automatically-open-a-task-pane-with-a-document.
Original Answer:
Commands cannot currently be used to launch a task pane when the document opens.
However, you can cause the task pane to open automatically if you remove all commands from the manifest entirely.

Resources