0

I am working on Outlook add-in and i added the extension point of add-in from appointment organizer command surface. I have to execute some functionality in my add-ins so for that I have parsed required information from appointment organizer.

After filling the information if i open the add-in then info (e.g meeting title, meeting start/end time, location, attendees, body text etc ). It's working fine till now.

But if i have opened the the add ins and changed something in the meeting title, attendees, timing etc then it's not reflecting in the add-in untill i closed and reopen the add-in. I want data must be refreshed at real time editing, I'm using getAsync api and calling this function in Office.initialize = function(reason) but it's not refreshing.

function getMeetingTitle() {
     item.subject.getAsync(
     function (asyncResult) {
          if (asyncResult.status == Office.AsyncResultStatus.Failed) {
                  write(asyncResult.error.message);
     }else {
            console.log('The start time in local time is: ' + asyncResult.value);
            $('#meetTitle').text(asyncResult.value);
     }
});
}

enter image description here

Vikas Rajput
  • 1,754
  • 1
  • 14
  • 26
  • 1
    You are probably looking at [add-in for event-based activation](https://learn.microsoft.com/en-us/office/dev/add-ins/outlook/autolaunch) this is preview feature. Another option would be to set timer and call `get` properties time to time to update your view. And the last thing is ... you need to think again why do you need to duplicate the information user sees already in your view? – Slava Ivanov May 17 '22 at 14:52
  • Thanks for the answer @SlavaIvanov, I am creating catering service order. during the meeting so the value i have parsed in task pane that will be needed when I will proceed further. As i new in add-in so i was trying to get these first before moving further. – Vikas Rajput May 18 '22 at 05:07

1 Answers1

1

The Office.initialize function is only called once when the add-in is initialized. Unfortunately you can't add a handler for item.subject change, your only way is to periodically call getAsync() on whichever property you want.