Office.InfobarDetails interface
Provides additional details about the notification message that raised the Office.EventType.InfobarClicked
event.
Remarks
Examples
/*
* 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;
}
}
Properties
action |
The action type. Currently, "Dismiss" is the only supported action. |
infobar |
The notification type. |
Property Details
actionType
The action type. Currently, "Dismiss" is the only supported action.
actionType: MailboxEnums.InfobarActionType;
Property Value
Remarks
infobarType
The notification type.
infobarType: MailboxEnums.InfobarType;
Property Value
Remarks
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
Office Add-ins