This topic has not yet been rated - Rate this topic

File.getSliceAsync method (JavaScript API for Office v1.1)

JavaScript API for Office v1.1

Returns the specified slice.

Last modified: February 26, 2014

File.getSliceAsync(sliceIndex, callback);
sliceIndex

Type: number

Specifies the zero-based index of the slice to be retrieved. Required.

callback

Type: object

A function that is invoked when the callback returns, whose only parameter is of type AsyncResult. Optional.

When the function you passed to the callback parameter executes, it receives an AsyncResult object that you can access from the callback function's only parameter.

In the callback function passed to the getSliceAsync method, you can use the properties of the AsyncResult object to return the following information.

Property

Use to...

AsyncResult.value

Access the Slice object.

AsyncResult.status

Determine the success or failure of the operation.

AsyncResult.error

Access an Error object that provides error information if the operation failed.

AsyncResult.asyncContext

Access your user-defined object or value, if you passed one as the asyncContext parameter.

App types

Content apps, Task pane apps

Supported clients

PowerPoint 2013, PowerPoint 2013 SP1, Word 2013, and Word 2013 SP1

Library

Office.js

Namespace

Office

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.