I have some user data from my database that I'd like to display when the user clicks or opens an email. I plan on using the Office.context.mailbox.item.notificationMessages.replaceAsync function to display my data.
My goal is to use the Office.context.mailbox.item.EntryID to query my database to see if the file already exists in my system. From there I'd like to display some status data. I'm not seeing a way to do this since Office.Initialize in FunctionFile.js is only called when clicking my add-in button. Is this possible or am I missing something?
Thanks for any help.
We don't have an API named EntryID
. However, we have APIs for the EWS ID; Office.context.mailbox.item.id
for read mode, and Office.context.mailbox.item.getItemIdAsync
for compose mode. We have Event-Based add-ins that are automatically launched when an email is opened. See documentation here. This feature is currently in preview. For now, you can only try it out in the web-based Outlook client. Also, this feature only works for compose mode. We don't have such a feature for read mode. If your scenarios include read mode, please add a feature request to our user-voice page. Feature requests on user-voice are considered, when we go through our planning process.