1
votes

For Office 365 Outlook Web App, we would like to convert attachments to links once end user uploads them, however we didn't see an attachment notification event at current Outlook Addin.

Another approach we could do is to ask them to use our own buttons for uploading, however we need to guide end user to use our own buttons, could we add some message at top of email body like below once new email message box is displayed? enter image description here

Somehow based on our research, Outlook Addin only has one event right now which is SendEvent, could someone confirm this? if so, it is rather limited.

1

1 Answers

4
votes

To display a custom message use Office.context.mailbox.item.notificationMessages object. For example to add a message to current item the code may looks like ...

Office.context.mailbox.item.notificationMessages.addAsync("information", {
    type: "informationalMessage",
    message : "My custom message.",
    icon : "iconid",
    persistent: false
});

Be aware there are a maximum of 5 notifications per message and maximum length of each message text is 150 characters per Office.NotificationMessageDetails interface.

For the secondary question you would need to look at available events in Office.EventType enum. Over here you'll see few events available to Outlook app. One of them you are interested in is AttachmentsChanged which is currently available only in Preview (not released yet, but will be soon).