Office.cast.item property (JavaScript API for Office)

apps for Office

Provides IntelliSense specific to compose or read mode messages and appointments.

Last modified: February 27, 2015

Hosts:

Outlook

Available in Requirement set

Mailbox

Last changed in

1.0

See all support details

Applicable Outlook modes

Design time in Visual Studio only

Office.cast.item.toAppointmentCompose(Office.context.mailbox.item);
Office.cast.item.toAppointmentRead(Office.context.mailbox.item);
Office.cast.item.toAppointment (Office.context.mailbox.item);
Office.cast.item.ToItemCompose (Office.context.mailbox.item);
Office.cast.item.ToItemRead (Office.context.mailbox.item);
Office.cast.item.toMessageCompose(Office.context.mailbox.item);
Office.cast.item.toMessageRead(Office.context.mailbox.item);
Office.cast.item.toMessage(Office.context.mailbox.item);

A set of methods that enable you to select the appropriate IntelliSense for your mail app.

This property and its methods support IntelliSense for developing mail apps on Visual Studio only. They do not have any effect on other development tools.

The Office.cast.item methods are used at design time in Visual Studio to provide specific IntelliSense for the Office.context.mailbox.item property. When you use the toAppointmentCompose method, for example, IntelliSense will show only the Appointment methods and properties that apply in compose mode.

At run time, the Office.cast.item methods have no effect on your mail app.

The following example uses the toMessageCompose method to cast the Office.context.mailbox.item property so that it will only show IntelliSense for the Message object in compose mode. After the cast, the message variable will only display IntelliSense for methods and properties that can be used in compose mode.

var message = Office.cast.item.toMessageCompose(Office.context.mailbox.item);

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

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

Office for Windows desktop

Office for Windows RT

Office Online
(in browser)

Outlook for Mac

Outlook

Available in requirement sets

Mailbox

Minimum permission level

Restricted

App types

Mail

Library

Office.js

Namespace

Office

Version

Changes

1.0

  • Introduced

Show:
© 2015 Microsoft