Home > Back-end >  Office.addin.hide APIis not working for Excel and powerpoint Add-ins
Office.addin.hide APIis not working for Excel and powerpoint Add-ins

Time:11-03

I have followed the article . https://learn.microsoft.com/en-us/office/dev/add-ins/develop/show-hide-add-in

When calling API Office.addin.hide() it gives below exception for Excel and PowerPoint .

RichApi.Error: Sys.InvalidOperationException: The API is only applies to Addin using Shared Runtime.

CodePudding user response:

Make sure you use a shared runtime. See Shared runtime requirement sets to be sure your host application supports it.

Steps required for configuring a shared runtime for Office add-ins are described in the Configure your Office Add-in to use a shared runtime article.

You can configure your Office Add-in to run all of its code in a single shared runtime. This enables better coordination across your add-in and access to the DOM and CORS from all parts of your add-in. It also enables additional features such as running code when the document opens, or enabling or disabling ribbon buttons.

CodePudding user response:

Yes it is in order kindly find [Screenshot ] 1 the XML screenshot .

  • Related