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 object (JavaScript API for Office)

apps for Office

Represents an appointment item from the server.

Last modified: March 18, 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.1

Applicable Outlook modes

Compose or read

See all support details

Office.context.mailbox.item

Properties

Property name

Outlook mode

Description

Introduced in

attachments

Read

Gets an array of attachments for the appointment.

Version 1.0

body

Compose

Gets a Body object that provides access the body text of the appointment.

Version 1.1

end

Compose or read

Gets a Date object that contains or a Time object that provides access to the date and time that the appointment is to end.

Version 1.0

location

Compose or read

Gets a string that contains or a Location object that provides access to the location of the appointment.

Version 1.0

normalizedSubject

Read

Gets the subject of the appointment, with all prefixes removed (including "RE:" and "FWD:").

Version 1.0

optionalAttendees

Compose or read

Gets an EmailAddressDetails object that contains or a Recipients object that provides access to optional attendees.

Version 1.0

organizer

Read

Gets an EmailAddressDetails object that contains the organizer of the appointment.

Version 1.0

requiredAttendees

Compose or read

Gets an EmailAddressDetails object that contains or a Recipients object that provides access to required attendees.

Version 1.0

resources

Read

Gets an EmailAddressDetails object that contains a list of resources required for the meeting.

Version 1.0

start

Compose or read

Gets a Date object that contains or a Time object that provides access to the date and time that the appointment is to begin.

Version 1.0

subject

Compose or read

Gets a string that contains or a Subject object that provides access to the complete subject of the appointment with all prefixes.

Version 1.0

Methods

Method name

Outlook mode

Description

Introduced in

addFileAttachmentAsync

Compose

Adds files as attachments to the appointment.

Version 1.1

addItemAttachmentAsync

displayReplyAllForm

displayReplyForm

Compose

Read

Read

Adds mailbox items as attachments to the appointment.

Displays a reply form including organizer and attendees.

Displays a reply form including only the organizer.

Version 1.1

Version 1.0

Version 1.0

getEntities

Read

Returns all entities recognized in the appointment.

Version 1.0

getEntitiesByType

Read

Returns all entities of the specified type recognized in the appointment.

Version 1.0

getFilteredEntitiesByName

Read

Returns all matches recognized in the appointment that meet the requirements of the named filter.

Version 1.0

getRegExMatches

Read

Returns all regular expression matches recognized in the appointment.

Version 1.0

getRegExMatchesByName

Read

Returns all regular expression matches recognized in the appointment using the named regular expression.

Version 1.0

removeAttachmentAsync

Compose

Removes a specified or all attachments from the appointment.

Version 1.1

The Appointment object is returned as the item property of the Mailbox object. The Appointment object extends the Item object.

If the user-selected item is a recurring appointment, in Outlook for Mac, a mail app can access the item ID and other properties of only the master appointment, but not those of an instance of the recurring appointment. On the other supported Outlook hosts, the mail app can access all the properties of the item, and with the item ID, use Mailbox.displayAppointmentForm to display the item.

The following code example assigns the start and end properties of the Appointment object to variables.

var startDateTime = Office.context.mailbox.item.start;
var endDateTime = Office.context.mailbox.item.end;

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

ReadWrite but some members accessible with lesser permission.

App types

Mail

Library

Office.js

Namespace

Office

Version

Changes

1.1

The Appointment object is supported in compose mode mail apps. The following properties were modified to have a different behavior to support compose mode:

  • end property

  • optionalAttendees property

  • requiredAttendees property

  • resources property

  • start property

  • subject property

The following properties and methods were added to support compose mode:

  • addFileAttachmentAsync method

  • addItemAttachmentAsync method

  • body property

  • removeAttachmentAsync method

1.0

Introduced

Show:
© 2015 Microsoft