Export (0) Print
Expand All

Item object (JavaScript API for Office v1.1)

JavaScript API for Office v1.1

Provides a base object for all items provided by an application.

Last modified: June 12, 2014

Applicable Outlook modes

Compose or read

Available in requirement sets

Mailbox

Office.context.mailbox.item

Methods

Method name

Outlook mode

Description

Introduced in

loadCustomPropertiesAsync

Compose or read

Loads custom properties that have been stored on the server for a specified item.

Version 1.0

Properties

Property name

Outlook mode

Description

Introduced in

dateTimeCreated

Read

Gets the date and time that the item was created.

Version 1.0

dateTimeModified

Read

Gets the date and time that the item was last modified.

Version 1.0

itemClass

Read

Gets the item class of the item.

Version 1.0

itemId

Read

Gets the unique identifier for the item.

Version 1.0

itemType

Compose or read

Gets the type of the item.

Version 1.0

The Item object is the base object for objects that represent the specified item. You can determine the actual Item instance returned by using the itemType property. The descendent of the Item object associated with the item type is listed in the following table.

Item type

Object

Meeting

Appointment

Message

Message

The following JavaScript code example shows how to access the subject property of the current item in Outlook. Note that the current item can be a Message object or Appointment object, both of which extend the Item object.

// The initialize function is required for all apps.
Office.initialize = function () {
    // Checks for the DOM to load using the jQuery ready function.
    $(document).ready(function () {
    // After the DOM is loaded, app-specific code can run.
    var item = Office.context.mailbox.item;
    var subject = item.subject;
    // Continue with processing the subject of the current item, which can be a message or appointment.
    });
}

App types

Mail app

Supported clients

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

Library

Office.js

Namespace

Office

Show:
© 2014 Microsoft