Office.MailboxEnums.AttachmentStatus enum

Specifies whether an attachment was added to or removed from an item.

Remarks

[ API set: Mailbox 1.8 ]

Applicable Outlook mode: Compose or Read

Examples

// Get the attachment that was just added to a message or appointment.
function myHandlerFunction(eventarg) {
    if (eventarg.attachmentStatus === Office.MailboxEnums.AttachmentStatus.Added) {
        const attachment = eventarg.attachmentDetails;
        console.log("Event Fired and Attachment Added!");
        getAttachmentContentAsync(attachment.id, options, callback);
    }
}

Office.context.mailbox.item.addHandlerAsync(Office.EventType.AttachmentsChanged, myHandlerFunction, myCallback);

Fields

Added = "added"

An attachment was added to the item.

Removed = "removed"

An attachment was removed from the item.