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

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

Last modified: November 24, 2014

Applicable Outlook modes

Design time in Visual Studio only

Available in requirement sets

Mailbox

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);

App types

Mail app

Supported clients

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

Library

Office.js

Namespace

Office

Show:
© 2015 Microsoft