Export (0) Print
Expand All

Body.prependAsync method (JavaScript API for Office v1.1)

JavaScript API for Office v1.1

Adds the specified content to the beginning of the item body. This method was introduced in version 1.1.

Last modified: June 26, 2014

Applicable Outlook modes

Compose

Available in requirement sets

Mailbox

Office.context.mailbox.item.body.prependAsync(data, [options,] callback);

data

The string to be inserted at the beginning of the body. The string is limited to 1,000,000 characters.

options

Any optional parameters or state data passed to the method. Optional.

callback

The method to call when the string is inserted. Optional.

The prependAsync method inserts the specified string at the beginning of the item body. Calling the prependAsync method is the same as calling the setSelectedDataAsync method with the insertion point at the beginning of the body content.

If you specify a callback method, the method will be called with one parameter, asyncResult, which contains a code that indicates an error that occurred while adding the string.

Error code

Description

DataExceedsMaximumSize

The data parameter is longer than 1,000,000 characters.

App types

Mail app

Supported clients

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

Library

Office.js

Namespace

Office

Show:
© 2014 Microsoft