Mailbox.displayAppointmentForm method (JavaScript API for Office v1.0)

JavaScript API for Office v1.0

Displays an existing calendar appointment.

Last modified: August 27, 2014



The Exchange Web Services (EWS) identifier for an existing calendar appointment.

The displayAppointmentForm method opens an existing calendar appointment in a new window on the desktop or in a dialog box on mobile devices.

In Outlook Web App, this method opens the specified form only if the body of the form is less than or equal to 32KB number of characters.

If the specified item identifier does not identify an existing appointment, a blank pane opens on the client computer or device, and no error message will be returned.

The following code example in JavaScript obtains the selected item, checks if the item is an appointment, and displays it in an appointment form.

var myOm;
var myItem;

// Initialize runtime.
// The initialize function is required for all apps.
Office.initialize = function () {
    myOm = Office.context.mailbox;
    // Get the selected item.
    myItem = myOm.item;

    // Checks for the DOM to load using the jQuery ready function.
    $(document).ready(function () {
        // After the DOM is loaded, can display content in app UI.
function displaySelectedAppointment()
    // Display selected item only if the item is an appointment.
    if (myitem.itemType == Office.MailboxEnums.ItemType.Appointment)
        alert ("Selected item is not an appointment.");

Supported clients

Outlook 2013, Outlook 2013 SP1, Outlook 2013 RT, Outlook Web App, and OWA for Devices


Outlook-15.js, OutlookWebApp-15.js



© 2014 Microsoft