Office.MailboxEnums.AttachmentStatus enum

指定是向项目添加附件还是从项中删除附件。

注解

[ API set: Mailbox 1.8 ]

适用的 Outlook 模式:撰写或阅读

示例

// 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);

字段

Added = "added"

附件已添加到项目。

Removed = "removed"

附件已从项目中删除。