TableCellCollection Object (JavaScript API for Word)

Word 2016, Word for iPad, Word for Mac, Word Online

Contains the collection of the document's TableCell objects.

Properties

Property Type Description Req. Set
items TableCell A collection of tableCell objects. Read-only. 1.3

See property access examples.

Relationships

None

Methods

Method Return Type Description Req. Set
getFirst() TableCell Gets the first table cell in this collection. Throws if this collection is empty. 1.3
getFirstOrNullObject() TableCell Gets the first table cell in this collection. Returns a null object if this collection is empty. 1.3
getItem(index: number) TableCell Gets a table cell object by its index in the collection. 1.3
load(param: object) void Fills the proxy object created in JavaScript layer with property and object values specified in the parameter. 1.1

Method Details

getFirst()

Gets the first table cell in this collection. Throws if this collection is empty.

Syntax

tableCellCollectionObject.getFirst();

Parameters

None

Returns

TableCell

getFirstOrNullObject()

Gets the first table cell in this collection. Returns a null object if this collection is empty.

Syntax

tableCellCollectionObject.getFirstOrNullObject();

Parameters

None

Returns

TableCell

getItem(index: number)

Gets a table cell object by its index in the collection.

Syntax

tableCellCollectionObject.getItem(index);

Parameters

Parameter Type Description
index number A number that identifies the index location of a table cell object.

Returns

TableCell

load(param: object)

Fills the proxy object created in JavaScript layer with property and object values specified in the parameter.

Syntax

object.load(param);

Parameters

Parameter Type Description
param object Optional. Accepts parameter and relationship names as delimited string or an array. Or, provide loadOption object.

Returns

void