Partager via


Office.MailboxEnums.InfobarType enum

Type de notification autorisé par Office.EventType.InfobarClicked.

Remarques

[ Ensemble d’API : Boîte aux lettres 1.10 ]

Exemples

/*
* This snippet activates when a notification message is dismissed from an Outlook message or appointment.
* The event handler logs the custom action and notification type to the console.
*/
Office.context.mailbox.item.addHandlerAsync(Office.EventType.InfobarClicked, eventHandler, callback);

function eventHandler(event) {
    const infobarDetails = event.infobarDetails;

    // Log the custom action type.
    console.log(`Custom action type: ${infobarDetails.actionType}`);

    // Log the notification type.
    switch (infobarDetails.infobarType) {
        case Office.MailboxEnums.InfobarType.Error:
            console.log("Notification type: Error message");
            break;
        case Office.MailboxEnums.InfobarType.Informational:
            console.log("Notification type: Informational message");
            break;
        case Office.MailboxEnums.InfobarType.Insight:
            console.log("Notification type: Informational message with available actions from the task pane");
            break;
        case Office.MailboxEnums.InfobarType.ProgressIndicator:
            console.log("Notification type: Progress indicator");
            break;
    }
}

Champs

Informational = 0

La notification affiche un message d’information.

ProgressIndicator = 1

La notification affiche un indicateur de progression.

Error = 2

La notification affiche un message d’erreur.

Insight = 3

La notification affiche un message d’information avec des actions.