Reputation: 99
I am currently working on an outlook web add-in.
My add-in is a on message compose one. I'm closing de compose window and trying to run a function afterwards, but the function I want to execute is not executed:
Office.context.mailbox.item.close(); //Closing the compose window
executeInBack(); //This is not executed
The function is probobly not executed due to the add-in closing before the function could run.
I was wondering if there was an extention point where I cloud always execute a function?
Upvotes: 0
Views: 305
Reputation: 64
Posting as an answer, as I am unable to leave a comment to the discussion above.
I concur with Eugene; those are the only options that would work for the scenario you're after. If you're able to run the action before the item is closed, a possibility is to use another event to process the email body before it's sent (and while the compose window is active), e.g. onMessageSend (see Configure your Outlook add-in for event-based activation for further guidance).
Upvotes: 1
Reputation: 49445
Outlook web add-in work under the context of currently displayed item only. So, you need to run your action before the item is closed. Or just use a back-end service which can do the required work using Graph API after.
Upvotes: 0