Cell Interface

Definition

Represents a single table cell.

public interface class Cell
[System.Runtime.InteropServices.Guid("0002094E-0000-0000-C000-000000000046")]
public interface Cell
type Cell = interface
Public Interface Cell
Attributes

Remarks

The Cell object is a member of the Cells collection. The Cells collection represents all the cells in the specified object.

Use Cell(row, column), where row is the row number and column is the column number, or Cells(index), where index is the index number, to return a Cell object.

Use the Add(Object) method to add a Cell object to the Cells collection. You can also use the InsertCells(Object) method of the Selection object to insert new cells.

Use the Add method with the Rows or Columns collection to add a row or column of cells.

Use the Information[WdInformation] property with a Selection object to return the current row and column number.

Properties

Application

Returns a Application object that represents the creator of the specified object.

Borders

Returns or sets a Borders collection that represents all the borders for the specified object.

BottomPadding

Returns or sets an amount of space (in points) to add below the contents of a cell.

Column

Returns a Column object that represents the table column containing the specified cell.

ColumnIndex

Returns a value that indicates the number of the table column that contains the specified cell.

Creator

Returns a value that indicates the application in which the specified object was created.

FitText

Returns or sets a value that indicates if Microsoft Word visually reduces the size of text typed into a cell so that it fits within the column width.

Height

Returns or sets the height of the specified object (in points unless otherwise noted).

HeightRule

Returns or sets the rule for determining the height of the specified cell.

ID

Returns or sets the rule for determining the height of the specified cell.

LeftPadding

Returns or sets the amount of space (in points) to add to the left of the contents of a single cell.

NestingLevel

Returns the nesting level of the specified cell.

Next

Returns the next object in the collection.

Parent

Returns an object that represents the parent object of the specified object.

PreferredWidth

Returns or sets the preferred width (in points or as a percentage of the window width) for the specified cell.

PreferredWidthType

Returns or sets the preferred unit of measurement to use for the width of the specified cell.

Previous

Returns the previous object in the collection.

Range

Returns a Range object that represents the portion of a document that's contained in the specified object.

RightPadding

Returns or sets the amount of space (in points) to add to the right of the contents of a cell.

Row

Returns a Row object that represents the row containing the specified cell.

RowIndex

Returns the number of the row that contains the specified cell.

Shading

Returns a Shading object that refers to the shading formatting for the specified object.

Tables

Returns a Tables collection that represents all the tables in the specified cell.

TopPadding

Returns or sets the amount of space (in points) to add above the contents of a single cell or all the cells in a table.

VerticalAlignment

Returns or sets the vertical alignment of text in a cell of a table.

Width

Returns or sets the width of the specified object in points.

WordWrap

Returns or sets a value that indicates if Microsoft Word wraps text to multiple lines and lengthens the cell so that the cell width remains the same.

Methods

AutoSum()

Inserts an = (Formula) field that calculates and displays the sum of the values in table cells above or to the left of the cell specified in the expression.

Delete(Object)

Deletes a table cell and optionally controls how the remaining cells are shifted.

Formula(Object, Object)

Inserts an = (Formula) field that contains the specified formula into a table cell.

Merge(Cell)

Merges the specified table cell with another cell.

Select()

Selects the specified object.

SetHeight(Object, WdRowHeightRule)

Sets the height of a table cell.

SetWidth(Single, WdRulerStyle)

Sets the width of a cell in a table.

Split(Object, Object)

Splits a single table cell into multiple cells.

Applies to