gpt4 book ai didi

javascript - 如何显示 Outlook 365 插件的插件设置

转载 作者:行者123 更新时间:2023-12-01 01:58:45 25 4
gpt4 key购买 nike

我正在使用 Javascript 和 REST API 编写 Outlook Web 插件。

我想要一些设置可用于我的无 GUI 加载项。

该加载项是一个垃圾邮件报告器。用户单击电子邮件上的按钮,该电子邮件会创建 ARF报告,然后该消息将被放入垃圾箱。

我想要为我的外接程序配置的选项是这样的

  • 稍后删除消息或移至特定文件夹
  • 已在“已发送邮件”中保存 ARF 报告
  • ARF 报告的目标电子邮件地址(出于开发目的,该地址将在最终版本中删除)。

但是,我找不到带有设置的加载项的任何示例,并且由于这是一个 headless 加载项,因此我无法将“设置”链接或选项卡添加到加载项 Pane (因为没有任务 Pane )。

有人知道如何显示 Outlook Web 插件的插件设置吗?

最佳答案

您可以将类似的 UI 较少操作按钮添加到 list 中,并使用显示对话框 API 从 JavaScript 打开您的设置页面。

yourSetting = function () {
Office.context.ui.displayDialogAsync(settingsUrl, options, callback);
}

带有设置按钮的 list

<OfficeTab id="TabDefault">
<Group id="msgMyGroup">
<Label resid="groupLabel" />
<!-- Your UI-less button -->
<Control xsi:type="Button" id="msgFunctionButton">
<Label resid="functionButtonLabel" />
..
..
<Action xsi:type="ExecuteFunction">
<FunctionName>yourFunction</FunctionName>
</Action>
</Control>
<!-- Your Settings UI-less button -->
<Control xsi:type="Button" id="msgSettingsButton">
<Label resid="settingsLabel" />
..
..
<Action xsi:type="ExecuteFunction">
<FunctionName>yourSetting</FunctionName>
</Action>
</Control>
</Group>
</OfficeTab>

由于您有一个场景,需要向用户显示一些 Web 内容(设置页面),因此您还可以在 list 中创建一个任务 Pane 条目,并在任务 Pane 中显示您的设置页面。

关于javascript - 如何显示 Outlook 365 插件的插件设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50788560/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com