This documentation is archived and is not being maintained.

Lines Collection

A collection of Line objects that represents the lines in a Rectangle object that is of type wdTextRectangle.

Use the Lines property to return a collection of lines for a specified rectangle. The following example accesses the lines in the first rectangle in the first page in the active document.

Dim objLines As Lines 
Set objLines = ActiveDocument.ActiveWindow.Panes(1) _ 

Use the RectangleType property of the specified Rectangle object to determine whether the Rectangle object is of type wdTextRectangle. The following example returns the collection of lines in the first rectangle in the first page of the active document if the specified rectangle contains text.

Dim objRectangle As Rectangle 
Dim objLines As Lines 
Set objRectangle = ActiveDocument.ActiveWindow _ 
If objRectangle.RectangleType = wdTextRectangle Then _ 
 Set objLines = objRectangle.Lines