Search code examples
outlookoffice-jsoutlook-addinoutlook-web-addins

Outlook custom add in


I'm creating a custom add in for outlook using Yeoman and node.js. I am already able to produce an output but the client wants it to be a pop up. is it possible to change it from a taskpane to a pop up?

This is the image of the output. Will it be possible for me to change it to a pop up?


Solution

  • You can replace the task pane with a dialog. You need to use the Office dialog API to open dialog boxes in your Office Add-in. The Use the Office dialog API in Office Add-ins article provides guidance for using the dialog API in your Office Add-in.

    To open a dialog box, your code, typically a page in a task pane, calls the displayDialogAsync method and passes to it the URL of the resource that you want to open. The page on which this method is called is known as the "host page". For example, if you call this method in script on index.html in a task pane, then index.html is the host page of the dialog box that the method opens.

    The resource that is opened in the dialog box is usually a page, but it can be a controller method in an MVC application, a route, a web service method, or any other resource. In this article, 'page' or 'website' refers to the resource in the dialog box. The following code is a simple example.

    Office.context.ui.displayDialogAsync('https://yourAddinDomain/myDialog.html');
    

    For a sample add-in see Office Add-in Dialog API Example.