Outlook 加载项桌面:Office.context.ui.close() 不适用于桌面版本

发布于 2025-01-17 22:48:45 字数 363 浏览 2 评论 0原文

我正在为网络和桌面用户构建 Outlook 插件。 我正在努力寻找关闭桌面版本加载项的方法

在我的加载项中,我插入了一个调用

Office.context && Office.context.ui && Office.context.ui.closeContainer();

onClick 来关闭加载项的按钮。 这适用于该加载项的网络版本,但不适用于桌面版本, 我的代码有问题还是桌面版本不支持此方法?

环境设置: 微软 Outlook 2016 (16.0.5182.1000) 本地 Exchange 2016(内部版本 15.1.2375.7)

I'm building an outlook add-in for web and desktop users.
And I'm struggling to find the method that closes the add-in for the desktop version

In my Add-in, I inserted a button that invokes

Office.context && Office.context.ui && Office.context.ui.closeContainer();

onClick to close the add-in.
This works on the web version of the add-in but not on the desktop one,
Is there a problem with my code or is the desktop version not supporting this method ?

Environment setup :
Microsoft Outlook 2016 (16.0.5182.1000)
Exchange 2016 (build version 15.1.2375.7) on-premise

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

权谋诡计 2025-01-24 22:48:45

它应该适用于桌面上的任务窗格。这是 closecontainer 方法:

从任务窗格调用:任务窗格将关闭。由displayDialogAsync打开的任何对话框也将关闭。如果任务窗格支持固定并由用户固定,则将未插入。

但是最低要求集为1.5,不支持Outlook 2016。

另外,您可能会找到一个类似的线程在这里

It should work for task panes on the desktop. Here is the description for the closeContainer method:

Called from a task pane: The task pane will close. Any dialog opened by displayDialogAsync will also close. If the task pane supports pinning and was pinned by the user, it will be un-pinned.

But the minimum requirement set is 1.5 where Outlook 2016 is not supported.

Also you may find a similar thread here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文