Office . onReady ( ( ) => { } ) ; param event function action ( event ) { const message = { type : Office . MailboxEnums . ItemNotificationMessageType . InformationalMessage , message : "Performed action." , icon : "Icon.80x80" , persistent : true , } ; Office . context . mailbox . item . notificationMessages . replaceAsync ( "action" , message ) ; event . completed ( ) ; } function getGlobal ( ) { return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : undefined ; } const g = getGlobal ( ) as any ; g . action = action ;