Subject

Provides methods to get and set the subject of an appointment or message in an Outlook add-in.

Requirements
Requirement Value
Minimum mailbox requirement set version 1.1
Minimum permission level ReadItem
Applicable Outlook mode Compose

Methods

getAsync([options], callback)

Gets the subject of an appointment or message.

The getAsync method starts an asynchronous call to the Exchange server to get the subject of an appointment or message.

Parameters:
Name Type Attributes Description
options Object <optional> An object literal that contains one or more of the following properties.

Properties
NameTypeAttributesDescription
asyncContextObject<optional>Developers can provide any object they wish to access in the callback method.
callback function When the method completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an AsyncResult object.

The subject of the item is provided as a string in the asyncResult.value property.|

Requirements
Requirement Value
Minimum mailbox requirement set version 1.1
Minimum permission level ReadItem
Applicable Outlook mode Compose

setAsync(subject, [options], [callback])

Sets the subject of an appointment or message.

The setAsync method starts an asynchronous call to the Exchange server to set the subject of an appointment or message. Setting the subject overwrites the current subject, but leaves any prefixes, such as "Fwd:" or "Re:" in place.

Parameters:
Name Type Attributes Description
subject String The subject of the appointment or message. The string is limited to 255 characters.
options Object <optional> An object literal that contains one or more of the following properties.

Properties
NameTypeAttributesDescription
asyncContextObject<optional>Developers can provide any object they wish to access in the callback method.
callback function <optional> When the method completes, the function passed in the callback parameter is called with a single parameter, asyncResult, which is an AsyncResult object.
If setting the subject fails, the asyncResult.error property will contain an error code.
Error codeDescription
DataExceedsMaximumSizeThe subject parameter is longer than 255 characters.
Requirements
Requirement Value
Minimum mailbox requirement set version 1.1
Minimum permission level ReadItem
Applicable Outlook mode Compose