Edit

OfficeRuntime.Dialog interface

Object representing the dialog box.

Remarks

API set: CustomFunctionsRuntime 1.1

Used by

Examples

const dialogUrl = "https://your-addin-domain.com/dialog.html";
const dialogOptions: OfficeRuntime.DisplayWebDialogOptions = {
  height: "50%",
  width: "50%",
  displayInIFrame: false,
  onMessage: function (message: string, dialog?: OfficeRuntime.Dialog) {
    dialog?.close();
    console.log("Dialog result: " + message);
  },
  onRuntimeError: function (error: Error, dialog?: OfficeRuntime.Dialog) {
    dialog?.close();
    console.log("Dialog error: " + error.message);
  },
}
OfficeRuntime.displayWebDialog(dialogUrl, dialogOptions);

Methods

close()

Method to close a dialog box. Returns a Promise.

Method Details

close()

Method to close a dialog box. Returns a Promise.

close(): Promise<void>;

Returns

Promise<void>

Remarks

API set: CustomFunctionsRuntime 1.1