OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
657 stars 93 forks source link

How to use Office.js Ribbon API to auto focus on custom tab when taskpane is loaded #2500

Closed gopinathshiva closed 1 year ago

gopinathshiva commented 2 years ago

In my project, I'm using Ribbon API to create custom tabs in excel. This custom tab will be created when the task pane is loaded.

However, I'm unable to autofocus on the created custom tab when the task pane is loaded. Hence I would like to know how to achieve this functionality. Any help on this is appreciated.

nkkinariwala commented 2 years ago

Thanks @gopinathshiva for your question. For How-to question, can you plesae post it on Stack Overflow and tag it with office-js?https://stackoverflow.com/questions/tagged/office-js

gopinathshiva commented 2 years ago

@nkkinariwala Thanks for the reply. Similar question asked in stackoverflow as well but its older hence reaching out directly to office-js developers on this.

I just want to know whether its possible or not from your side

gopinathshiva commented 2 years ago

@nkkinariwala Any updates on this ?

AbidRahman-MSFT commented 2 years ago

Hey @gopinathshiva - there is currently no way to set focus to the custom add-in tabs using Office.js. We want to avoid any scenario where multiple add-ins can potentially compete for focus on their tab.

I encourage you to post the request to aka.ms/m365dev-suggestions.