How to make a TaskPane Add-in without ribbon button that opens automatically on a document

170 Views Asked by At

I'm creating an internal add-in that needs to automatically open the taskpane when someone opens up a PPTM that will be shared to them. The add-in needs to not have any sort of ribbon/menu buttons which is why it needs to automatically open, but I can't seem to do both of these things at the same time.

I've made the add-in not have any ribbon UI by removing the part of the manifest file which works, but stops the taskpane from automatically opening.

I've made the add-in automatically open by using Office.context.document.settings.set("Office.AutoShowTaskpaneWithDocument", true);  Office.context.document.settings.saveAsync();

as well as trying Office.addin.setStartupBehavior(Office.StartupBehavior.load); in the Office.initialize function which both seem to work.

However, when trying to use both in conjunction it doesn't seem to work. Am I missing something or is it not possible to have a UI-less taskpane add-in automatically open?

1

There are 1 best solutions below

2
On

There is no way to enable/show the task pane for the application, not document (presentation in your case).

You can enable the autoopen feature for a particular document only. Don't use the autoopen feature to artificially increase usage of your add-in. If it doesn't make sense for your add-in to open automatically with certain documents, this feature can annoy users. If Microsoft detects abuse of the autoopen feature, your add-in might be rejected from AppSource.

If you need to enable the task pane for a particular document you may find the required steps for that in the Automatically open a task pane with a document article. Note, the autoopen feature is currently supported in the following platforms:

  • Office on Windows Desktop. Build 16.0.8121.1000+
  • Office on Mac. Build 15.34.17051500+
  • Office on the web

If you want to get such feature implemented for the application I'd suggest filing a feature request at https://aka.ms/M365dev-suggestions .