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
Post a Comment