Outlook Web插件显示错误消息作为信息 [英] Outlook Web addin display Error message as information

查看:130
本文介绍了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.

推荐答案

根据 NotificationMessages object .ItemNotificationMessageType property .. 。

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


如果type为ProgressIndicator或ErrorMessage,则会自动提供 图标,并且该消息不会持久。

If type is ProgressIndicator or ErrorMessage, an icon is automatically supplied and the message is not persistent.

此特定客户端(可能是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插件显示错误消息作为信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆