Edit

Share via


Office.AttachmentsChangedEventArgs interface

Provides information about the attachment on a mail item that raised the Office.EventType.AttachmentsChanged event.

Remarks

[ API set: Mailbox 1.8 ]

Examples

TypeScript
// Handles the OnMessageAttachmentsChanged event.
function onMessageAttachmentsChangedHandler(event) {
    console.log(`Event: ${event.type}`);

    if (event.attachmentStatus === Office.MailboxEnums.AttachmentStatus.Added) {
        const attachment = event.attachmentDetails;
        // Perform operations on the attachment that was added.
    }
}

Properties

attachmentDetails

Gets the object that represents the attachment that was added or removed from a mail item. The object contains the id, name, size, and attachmentType properties of the attachment.

attachmentStatus

Specifies whether the attachment was added or removed from a mail item. For details, see MailboxEnums.AttachmentStatus.

type

Gets the type of event that was raised. For details, see Office.EventType.

Property Details

attachmentDetails

Gets the object that represents the attachment that was added or removed from a mail item. The object contains the id, name, size, and attachmentType properties of the attachment.

TypeScript
attachmentDetails: object;

Property Value

object

Remarks

[ API set: Mailbox 1.8 ]

attachmentStatus

Specifies whether the attachment was added or removed from a mail item. For details, see MailboxEnums.AttachmentStatus.

TypeScript
attachmentStatus: MailboxEnums.AttachmentStatus | string;

Property Value

Remarks

[ API set: Mailbox 1.8 ]

type

Gets the type of event that was raised. For details, see Office.EventType.

TypeScript
type: "olkAttachmentsChanged";

Property Value

"olkAttachmentsChanged"

Remarks

[ API set: Mailbox 1.8 ]