Search code examples
javascriptapioutlookadd-in

Office JavaScript API for Outlook - how can I refresh my web add-in when location changes?


I'm doing some research on possibilities of Office JavaScript API for Outlook. What I'd like to do is to have a web add-in that will be able to refresh itself (reload with relevant content) when user add someone to "to" field or changes "location" field creating new appointment.

I've found a way to read/write those fields i.e. like this:

Office.context.mailbox.item.subject.getAsync(function (result) {
    var subject = result;
});

But can't find a solution to somehow bind to 'changed' event on them. Is it at all possible with Office JavaScript API and Outlook?

Best regards, Kacper


Solution

  • While you can create bindings in Excel & Word (see: http://dev.office.com/reference/add-ins/shared/bindings.bindings), you cannot in Outlook as of this moment, unfortunately. You could periodically poll (not a great solution), or try to make sure the user adds recipients through the add-in, you can from there on set the recipients in the email as well(see: http://dev.office.com/docs/add-ins/outlook/get-set-or-add-recipients).

    Jesse