Quantcast
Channel: General Office Development forum
Viewing all articles
Browse latest Browse all 2257

Auto start an office.js add-in

$
0
0

Hello,

after many hours spent in research and trying what-not I'm close to giving up.

I'm currently developing an add-in for excel (and some of the other apps too) and I need to initialize another library within it as soon as the workbook is loaded. I read how this should be achieved but for some reason I just can't get it to work. It all works good if I create a task pane and initialize the custom library in it's javascript file via the Office.onReady() event. But this is not what I need. I don't actually need the task pane at all. I don't plan to have any UI.

So, another option was to attach a custom action to my custom button on the ribbon. But I don't really want the users to have to go and hit the button every time a workbook is loaded. I want this to happen ASAP after the workbook opens. I actually don't need the button to be visible too but was ready to have it there if Excel insisted on having a button of some kind.

My add-in doesn't need any visible buttons or taskpanes. It only needs to run a certain js logic which initializes my 3rd part library. I understand the manifest needs .html endpoints, which load the js themselves. The issue is - I don't know where to provide the url, so that it's read asap when the workbook loads.

If I provide it to the runtime, it seems like the Office.onReady() event never happens.

Actually, the only time Office.onReady() worked for me was when I open an actual task pane.

Any ideas are appreciated.



Viewing all articles
Browse latest Browse all 2257

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>