IsLast Property

Microsoft Word Visual Basic

expression.IsLast

expression    Required. An expression that returns one of the objects in the Applies To list.

Example

This example determines whether the second row is the last row in the table.

MsgBox ActiveDocument.Tables(1).Rows(2).IsLast
		

This example determines whether the first column in the selection is the last column in the table.

If Selection.Information(wdWithInTable) = True Then
    MsgBox Selection.Columns(1).IsLast
End If