问题
I want to display error notification. My code is following
Office.context.mailbox.item.notificationMessages.addAsync("error", {
type: "errorMessage",
message: "The add-in failed to process this message."
})
it shows response as
It should be error type message.
回答1:
According to documentation on NotificationMessages
object .ItemNotificationMessageType
property ...
If type is ProgressIndicator or ErrorMessage, an icon is automatically supplied and the message is not persistent.
This particular client (probably Web browser or desktop Outlook) displays "info" icon for errorMessage
type of notification. If you don't like "supplied" icon you may try to use InformationalMessage
type for your notification, which allow you to use the icon
property. This property is the reference to an icon that is defined in the manifest in the Resources section. You should be able to use any.
来源:https://stackoverflow.com/questions/48339987/outlook-web-addin-display-error-message-as-information