Outlook 自定义加载项
Outlook custom add in
我正在使用 Yeoman 和 node.js 创建 outlook 的自定义加载项。我已经能够生成输出,但客户希望它是一个弹出窗口。是否可以将其从任务窗格更改为弹出窗口?
This is the image of the output. Will it be possible for me to change it to a pop up?
您可以用对话框替换任务窗格。您需要使用 Office dialog API to open dialog boxes in your Office Add-in. The Use the Office dialog API in Office Add-ins 文章提供了在 Office 加载项中使用对话框 API 的指导。
要打开一个对话框,您的代码(通常是任务窗格中的一个页面)调用 displayDialogAsync
方法并将您要打开的资源的 URL 传递给它。调用此方法的页面称为“主机页面”。例如,如果您在任务窗格中 index.html 上的脚本中调用此方法,则 index.html 是该方法打开的对话框的宿主页面。
对话框中打开的资源通常是页面,但也可以是MVC应用程序中的控制器方法、路由、Web服务方法或任何其他资源。在本文中,'page' 或 'website' 指的是对话框中的资源。下面的代码是一个简单的例子。
Office.context.ui.displayDialogAsync('https://yourAddinDomain/myDialog.html');
有关示例加载项,请参阅 Office Add-in Dialog API Example。
我正在使用 Yeoman 和 node.js 创建 outlook 的自定义加载项。我已经能够生成输出,但客户希望它是一个弹出窗口。是否可以将其从任务窗格更改为弹出窗口?
This is the image of the output. Will it be possible for me to change it to a pop up?
您可以用对话框替换任务窗格。您需要使用 Office dialog API to open dialog boxes in your Office Add-in. The Use the Office dialog API in Office Add-ins 文章提供了在 Office 加载项中使用对话框 API 的指导。
要打开一个对话框,您的代码(通常是任务窗格中的一个页面)调用 displayDialogAsync
方法并将您要打开的资源的 URL 传递给它。调用此方法的页面称为“主机页面”。例如,如果您在任务窗格中 index.html 上的脚本中调用此方法,则 index.html 是该方法打开的对话框的宿主页面。
对话框中打开的资源通常是页面,但也可以是MVC应用程序中的控制器方法、路由、Web服务方法或任何其他资源。在本文中,'page' 或 'website' 指的是对话框中的资源。下面的代码是一个简单的例子。
Office.context.ui.displayDialogAsync('https://yourAddinDomain/myDialog.html');
有关示例加载项,请参阅 Office Add-in Dialog API Example。