1

Script Lab states in the description, that it works also with Office Online. How does that work? In Office Online I don't see any possibilities to add the Script Lab app (https://www.office.com/apps):

enter image description here


The above question leads to the two follow-up questions:

Can the Office JavaScript API be used without an AddIn?

If it is possible to use Script Lab (respectively, using the Office JavaScript API) for Office Online, I assume it must be possible to use the JavaScript API on a website to interact with a Word Online document (loaded into an iFrame) without having to install an Office AddIn? Would it be possible when hosting Office Online yourself using an Office Online Server (OOS)?

Can an Office AddIn have dynamic code like Script Lab?

If it is possible for Script Lab to dynamically change its functionality (by editing the JavaScript API code), is it also possible to create an AddIn that dynamically can update its content or functionality automatically (similar to the smooth update mechanism from ElectronJS)?

Simon Ferndriger
  • 4,455
  • 6
  • 28
  • 53

1 Answers1

1

I did it this way. On the Word Online ribbon, navigate Insert | Add-ins | Store. Then enter Script Lab in the search. Then click Add by Script Lab item. enter image description here

UPDATE 9/9/20: It is not possible to use the Office JavaScript library outside of an Office Add-in. It needs that context to initialize.

Rick Kirkham
  • 9,038
  • 1
  • 14
  • 32
  • Thanks - do you perhaps also have some answers for the two follow up questions? – Simon Ferndriger Sep 09 '20 at 11:56
  • I've answered one. I don't understand the question about dynamic changes. – Rick Kirkham Sep 09 '20 at 21:48
  • OK, what I meant is, in the Script Lab AddIn, you can just enter some random JavaScript code to be executed by the Microsoft JavaScript API. So, the content/functionality is dynamic in that case. Is it possible to create/install an AddIn that has similar behaviour, but instead of typing in the JavaScript code, you just load (the latest version of it) from a server? Or is it impossible due to security reasons? – Simon Ferndriger Sep 11 '20 at 08:04
  • 2
    An Office add-in is just a web application. Like any web app, if you have a script tag in the HTML that loads a JavaScript file from your server, then anytime you upload a new version of that JavaScript file, from then on, the latest version is loaded by clients using the web app. – Rick Kirkham Sep 11 '20 at 16:38