有没有办法在Outlook Web加载项中关闭当前Taskpane?

发布于 2025-01-18 06:24:48 字数 373 浏览 2 评论 0原文

我想知道是否有一种方法可以在 Outlook Web 加载项中以编程方式关闭任务窗格。

我点击了此链接: https ://learn.microsoft.com/en-us/office/dev/add-ins/develop/show-hide-add-in

但是 Office.addin.hide()Office.addin.showAsTaskpane() 不起作用。

有人可以帮助我吗?

I was wondering if there was a way to close a taskpane programmatically in an outlook web add-in.

I followed this link : https://learn.microsoft.com/en-us/office/dev/add-ins/develop/show-hide-add-in

But Office.addin.hide() and Office.addin.showAsTaskpane() are not working.

Can someone help me?

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

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

发布评论

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

评论(2

铃予 2025-01-25 06:24:48

使用 Office.context.ui.closeContainer() 关闭正在执行 JavaScript 的 UI 容器。

此方法的行为由以下内容指定:

  • 从无 UI 命令按钮调用:无效果。 displayDialogAsync 打开的任何对话框都将保持打开状态。

  • 从任务窗格调用:任务窗格将关闭。由 displayDialogAsync 打开的任何对话框也将关闭。如果任务窗格支持固定并且已被用户固定,则它将被取消固定。

Use the Office.context.ui.closeContainer() which closes the UI container where the JavaScript is executing.

The behavior of this method is specified by the following:

  • Called from a UI-less command button: No effect. Any dialog opened by displayDialogAsync will remain open.

  • 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.

泛滥成性 2025-01-25 06:24:48

@OutlookAdd-Insteam-Msft回答了我的问题。

您只需要使用:office.context.ui.closecontainer()

@OutlookAdd-insTeam-MSFT answered my question.

You simply have to use: Office.context.ui.closeContainer()

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