How the Ribbon ExecuteAction button will display a message on the TaskPane

We are working on adding the TaskPane Addin. And we add Addin commands to it.

  • We want to achieve functionality that a ribbon button can bring up some kind of user interface on the taskbar. (How to start the wizard) But we don't see a way to post a message from the invisible browser context. ExecuteAction works in the TaskPane window.

  • Will the ExecuteFunction check if the TaskPane opens or not?

  • In terms of performance, I would like to know how the ExecuteFunction loads an invisible HTML page. Is the HTML page loaded once per open Excel session? Versus is loaded every time ExecuteFunction is executed?

thank

+3


source to share


2 answers


Here are a few ways you can try to contact the ExecuteFunction in the taskbar:



  • LocalStorage Events (although this may not work in all browsers / platforms)
  • Cookies (no events, but you can poll for changes)
  • Office.context.document.Settings
  • Call to / from a web server (slow performance, but this method is guaranteed to work in any situation)
+1


source


To display a panel from a command, you must use the ShowTaskpane action; you cannot call the panel from the ExecuteFunction action. If you need to display the ExecuteFunction UI, the only available API is now displayDialog.



Every time ExecuteFunction is called, a new instance of the page is loaded, but if the page is cached the load times are actually pretty fast.

0


source







All Articles