LineType Property

Microsoft Word Visual Basic

Show All Show All

LineType Property

Returns a wdLineType constant that indicates whether a line is a text line or a table row.

wdLineType can be one of the following wdLineType constants.
wdTableRow
wdTextLine

expression.LineType

expression    Required. An expression that returns a Line object.

Example

The following example creates a reference to the table if the specified line type is wdTableRow.

    Dim objLine As Line
Dim objTable As Table

Set objLine = ActiveDocument.ActiveWindow _
    .Panes(1).Pages(1).Rectangles(1).Lines.Item(1)

If objLine.LineType = wdTableRow Then _
    Set objTable = objLine.Range.Tables(1)