item (Mailbox requirement set 1.1)

Office.context.mailbox.item

item is used to access the currently selected message, meeting request, or appointment. You can determine the type of the item by using the itemType property.

Requirements
Requirement Value
Minimum mailbox requirement set version 1.1
Minimum permission level Restricted
Applicable Outlook mode Appointment Organizer, Appointment Attendee,
Message Compose, or Message Read

Important

Android and iOS: There are limitations on when add-ins activate and which APIs are available. To learn more, refer to Add mobile support to an Outlook add-in.

Properties

Property Minimum
permission level
Details by mode Return type Minimum
requirement set
attachments ReadItem Appointment Attendee Array.<AttachmentDetails> 1.1
Message Read Array.<AttachmentDetails> 1.1
bcc ReadItem Message Compose Recipients 1.1
body ReadItem Appointment Organizer Body 1.1
Appointment Attendee Body 1.1
Message Compose Body 1.1
Message Read Body 1.1
cc ReadItem Message Compose Recipients 1.1
Message Read Array.<EmailAddressDetails> 1.1
conversationId ReadItem Message Compose String 1.1
Message Read String 1.1
dateTimeCreated ReadItem Appointment Attendee Date 1.1
Message Read Date 1.1
dateTimeModified ReadItem Appointment Attendee Date 1.1
Message Read Date 1.1
end ReadItem Appointment Organizer Time 1.1
Appointment Attendee Date 1.1
Message Read
(Meeting Request)
Date 1.1
from ReadItem Message Read EmailAddressDetails 1.1
internetMessageId ReadItem Message Read String 1.1
itemClass ReadItem Appointment Attendee String 1.1
Message Read String 1.1
itemId ReadItem Appointment Attendee String 1.1
Message Read String 1.1
itemType ReadItem Appointment Organizer MailboxEnums.ItemType 1.1
Appointment Attendee MailboxEnums.ItemType 1.1
Message Compose MailboxEnums.ItemType 1.1
Message Read MailboxEnums.ItemType 1.1
location ReadItem Appointment Organizer Location 1.1
Appointment Attendee String 1.1
Message Read
(Meeting Request)
String 1.1
normalizedSubject ReadItem Appointment Attendee String 1.1
Message Read String 1.1
optionalAttendees ReadItem Appointment Organizer Recipients 1.1
Appointment Attendee Array.<EmailAddressDetails> 1.1
organizer ReadItem Appointment Attendee EmailAddressDetails 1.1
requiredAttendees ReadItem Appointment Organizer Recipients 1.1
Appointment Attendee Array.<EmailAddressDetails> 1.1
sender ReadItem Message Read EmailAddressDetails 1.1
start ReadItem Appointment Organizer Time 1.1
Appointment Attendee Date 1.1
Message Read
(Meeting Request)
Date 1.1
subject ReadItem Appointment Organizer Subject 1.1
Appointment Attendee String 1.1
Message Compose Subject 1.1
Message Read String 1.1
to ReadItem Message Compose Recipients 1.1
Message Read Array.<EmailAddressDetails> 1.1

Methods

Method Minimum
permission level
Details by mode Minimum
requirement set
addFileAttachmentAsync(uri, attachmentName, [options], [callback]) ReadWriteItem Appointment Organizer 1.1
Message Compose 1.1
addItemAttachmentAsync(itemId, attachmentName, [options], [callback]) ReadWriteItem Appointment Organizer 1.1
Message Compose 1.1
displayReplyAllForm(formData) ReadItem Appointment Attendee 1.1
Message Read 1.1
displayReplyForm(formData) ReadItem Appointment Attendee 1.1
Message Read 1.1
getEntities() ReadItem Appointment Attendee 1.1
Message Read 1.1
getEntitiesByType(entityType) Restricted Appointment Attendee 1.1
Message Read 1.1
getFilteredEntitiesByName(name) ReadItem Appointment Attendee 1.1
Message Read 1.1
getRegExMatches() ReadItem Appointment Attendee 1.1
Message Read 1.1
getRegExMatchesByName(name) ReadItem Appointment Attendee 1.1
Message Read 1.1
loadCustomPropertiesAsync(callback, [userContext]) ReadItem Appointment Organizer 1.1
Appointment Attendee 1.1
Message Compose 1.1
Message Read 1.1
removeAttachmentAsync(attachmentId, [options], [callback]) ReadWriteItem Appointment Organizer 1.1
Message Compose 1.1

Example

The following JavaScript code example shows how to access the subject property of the current item in Outlook.

// 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.
  });
};