Search code examples
office-jsoffice-addinsoutlook-web-addins

Office JS Add-In


Is there an event that is triggered whenever a new email is selected within the Outlook Office JS Add-In api? For example, when you pin an Add-In, and replying to multiple emails via the in-line option, the code within the initializer is only called the first.

Office.onReady(function(info) {
    $(document).ready(function () {
    // time stamp here
    });
});

I confirmed this by printing out the stamp and it stays the same. I need a certain function to run each time a new email when replying to email via the inline not pop-out is used.

thanks.


Solution

  • Please refer to the addHandlerAsync API to subscribe to the ItemChanged event.

    This is part of the Pinnable Taskpane feature. To learn more about this concept in the Outlook Add-ins platform, please refer to this concept documentation.