Cells.VerticalAlignment property (Word)

Returns or sets the vertical alignment of text in one or more cells of a table. Read/write WdCellVerticalAlignment.

Syntax

expression.VerticalAlignment

expression Required. A variable that represents a 'Cells' collection.

Example

This example creates a 3x3 table in a new document and assigns a sequential cell number to each cell in the table. The example then sets the height of the first row to 20 points and vertically aligns the text at the top of the cells.

Set newDoc = Documents.Add 
Set myTable = newDoc.Tables.Add(Selection.Range, 3, 3) 
i = 1 
For Each c In myTable.Range.Cells 
 c.Range.InsertAfter "Cell " & i 
 i = i + 1 
Next 
With myTable.Rows(1) 
 .Height = 20 
 .Cells.VerticalAlignment = wdAlignVerticalTop 
End With

See also

Cells Collection Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.