Web插件显示错误消息作为信息

Web插件显示错误消息作为信息

本文介绍了Outlook Web插件显示错误消息作为信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想显示错误通知。我的代码如下:

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.

推荐答案

根据 object .ItemNotificationMessageType property .. 。

According to documentation on NotificationMessages object .ItemNotificationMessageType property ...

此特定客户端(可能是Web浏览器或桌面Outlook)显示 errorMessage 通知类型。如果您不喜欢提供图标,您可以尝试使用 InformationalMessage 类型作为通知,这样您就可以使用图标财产。此属性是对参考资料部分清单中定义的图标的引用。你应该可以使用任何。

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.

这篇关于Outlook Web插件显示错误消息作为信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 20:53