Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Appointment.displayReplyForm method (JavaScript API for Office)

apps for Office

Displays a reply form that includes only the organizer of the selected appointment item.

Last modified: March 03, 2015

Note Note

The name "apps for Office" is changing to "Office Add-ins". During the transition, the documentation and the UI of some Office host applications and Visual Studio tools might still use the term "apps for Office". For details, see New name for apps for Office and SharePoint.

Hosts:Outlook

App type: Mail

Available in requirement sets

Mailbox

Last changed in Mailbox

1.0

Applicable Outlook modes

Read

See all support details

Office.context.mailbox.item.displayReplyForm(htmlBody)

htmlBody

A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB.

Use this method only if the appointment is a meeting that involves an organizer and one or more attendees. Calendar items that do not involve attendees do not support replies.

In Outlook Web App, the reply form is displayed as a pop-out form in the 3-column view and a pop-up form in the 2- or 1-column view.

If htmlBody exceeds the 32-KB limit, displayReplyForm throws an exception.

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

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 the app UI.
        displayReply();
    });
}

function displayReply()
{
    // Display a reply form to the organizer only if 
    // the selected item is an appointment.
    if (myitem.itemType == Office.MailboxEnums.ItemType.Appointment)
    {
        myItem.displayReplyForm
        ("<html><head><head><body>This is the body of the appointment reply.</body></html>");
    }
}

A checkmark (√) in the following table indicates that this property is supported in the corresponding Outlook host application. An empty cell indicates that the Outlook host application doesn't support this property.

For more information about Office host application and server requirements, see Requirements for running apps for Office.

Supported hosts, by platform

Office for Windows desktop

Office for Windows RT

Office Online
(in browser)

OWA for Devices

Office for Mac

Outlook

√ (Read mode only)

Available in requirement sets

Mailbox

Minimum permission level

ReadItem

App types

Mail

Library

Office.js

Namespace

Office

Version

Changes

1.1

Added support for compose mode mail apps. In compose mode, returns a Subject object that provides getAsync and setAsync methods to get and set the subject of an appointment.

1.0

Introduced

Show:
© 2015 Microsoft