Office.Location interface

Provides methods to get and set the location of a meeting in an Outlook add-in.

[ API set: Mailbox 1.1 ]

Remarks

Minimum permission levelReadItem
Applicable Outlook modeCompose

Methods

getAsync(options, callback)

Gets the location of an appointment.

The getAsync method starts an asynchronous call to the Exchange server to get the location of an appointment. The location of the appointment is provided as a string in the asyncResult.value property.

setAsync(location, options, callback)

Sets the location of an appointment.

The setAsync method starts an asynchronous call to the Exchange server to set the location of an appointment. Setting the location of an appointment overwrites the current location.

Method Details

getAsync(options, callback)

Gets the location of an appointment.

The getAsync method starts an asynchronous call to the Exchange server to get the location of an appointment. The location of the appointment is provided as a string in the asyncResult.value property.

getAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<string>) => void): void;

Parameters

options
Office.AsyncContextOptions

Optional. An object literal that contains one or more of the following properties. asyncContext: Developers can provide any object they wish to access in the callback method.

callback
(result: AsyncResult<string>) => void

Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult.

[Api set: Mailbox 1.1]

Returns

void

Remarks

Minimum permission levelReadItem
Applicable Outlook modeCompose

In addition to this signature, the method also has the following signature:

getAsync(callback: (result: AsyncResult<string>) => void): void;

setAsync(location, options, callback)

Sets the location of an appointment.

The setAsync method starts an asynchronous call to the Exchange server to set the location of an appointment. Setting the location of an appointment overwrites the current location.

setAsync(location: string, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<void>) => void): void;

Parameters

location
string

The location of the appointment. The string is limited to 255 characters.

options
Office.AsyncContextOptions

Optional. An object literal that contains one or more of the following properties. asyncContext: Developers can provide any object they wish to access in the callback method.

callback
(result: AsyncResult<void>) => void

Optional. When the method completes, the function passed in the callback parameter is called with a single parameter of type Office.AsyncResult. If setting the location fails, the asyncResult.error property will contain an error code.

[Api set: Mailbox 1.1]

Returns

void

Remarks

Minimum permission levelReadItem
Applicable Outlook modeCompose
ErrorsDataExceedsMaximumSize - The location parameter is longer than 255 characters.

In addition to this signature, the method also has the following signatures:

setAsync(location: string): void;

setAsync(location: string, options: Office.AsyncContextOptions): void;

setAsync(location: string, callback: (result: AsyncResult<void>) => void): void;