Office.js - 打开对象时自动打开加载项侧面板

Office.js - automatically open add-in side pane when object opened

是否可以将应用程序清单设置为满足条件时,在打开对象时自动打开加载项的侧面板?

即当用户在 Outlook 日历中打开一个事件,并且该事件的描述中有一些文本时,每次用户打开事件窗体时都会打开加载项窗格?

Is it possible to set-up the app manifest in such way, that when a condition is met, the side pane of an add-in opens automatically when the object is opened?

Office.js 加载项旨在供最终用户调用。您无法使用清单或 JS 打开任务窗格。所以你的问题的答案是否定的,你不能根据满足的条件自动打开任务窗格。

可能的解决方法(不是您问题的解决方案)是在 Outlook 中实现可固定的任务窗格。这将使您的用户选择在从一个约会导航到另一个约会时始终保持加载项打开,但仍取决于用户选择是否保持窗格打开。请阅读更多关于 Implement a pinnable taskpane in Outlook and the announcement in the MSDN blog

I.e. when the user opens an event in Outlook calendar, and the event has some text in the description, the add-in pane is opened each time the user opens the event form?

这也有变通办法。您可能在清单文件中有规则,您的加载项何时可用(未调用,但对用户可用)。仍然是用户选择是否单击加载项。请参阅 Activation rules for Outlook add-ins 了解更多信息。

更新:

感谢@EduardoCMB 的评论,该功能现在可用于 Word、Excel 和 PowerPoint。有关何时以及如何使用该功能的列表 "best practices"。请参考文档... Automatically open a task pane with a document