word web addins - Office Web Add-In dynamically adding buttons -


i've started lean web add-ins microsoft word. add-in built in visual studio 2017 , c# app. of examples i've seen far hook event handlers buttons in office.initialize function in accompanying js.

office.initialize = function (reason) {     $(document).ready(function () {         app.initialize();          // add event handler button click event 'get-translation' button.         $('#mybutton').click(get-translation);     }); }; 

when loaded, don't know of buttons want display user dynamically created based upon user selections in various combo boxes. how can hook events newly created buttons office.initialize run when page loaded.

you don't have wire .click event in office.initialize, logical place when have static buttons wire up. can wire .click when add buttons dom.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -