Share via


Office.MailboxEnums.InfobarType enum

Office.EventType.InfobarClicked で許可される通知の種類。

注釈

[ API セット: メールボックス 1.10 ]

/*
* 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;
    }
}

フィールド

Informational = 0

通知には、情報メッセージが表示されます。

ProgressIndicator = 1

通知には進行状況インジケーターが表示されます。

Error = 2

通知にエラー メッセージが表示されます。

Insight = 3

通知は、アクションを含む情報メッセージを表示します。