RectangleType Property

WdRectangleType

wdRectangleType can be one of the following WdRectangleType constants.

wdLineBetweenColumnRectangle Represents a region corresponding to a line that separates columns.
wdMarkupRectangle Represents a space occupied by a comment balloon.
wdMarkupRectangleButton Represents a space occupied by the more (...) indicator that appears in a comment balloon when there is additional text for the comment.
wdPageBorderRectangle Represents a space occupied by a page border.
wdSelection Represents a space occupied by a selection tool, for example the table selection tool in the upper left corner of a table or the anchor for an image.
wdShapeRectangle Represents a space occupied by a shape.
wdSystem Not applicable.
wdTextRectangle Represents a space occupied by text.

expression.RectangleType

expression Required. An expression that returns a Rectangle object.

Remarks

Rectangles in Microsoft Word are sections within a page in a document that contain specific types of information. Some sections are portions of text; others are shapes. The purpose of rectangles is to allow more control over programmatic page layout.

Example

The following example accesses the first rectangle on the first page in the active document, and if it is a text rectangle, checks the spelling.

Dim objRectangle As Rectangle

Set objRectangle = ActiveDocument.ActiveWindow _
    .Panes(1).Pages(1).Rectangles(1)

If objRectangle.RectangleType = wdTextRectangle Then
    objRectangle.Range.CheckSpelling
End If

Applies to | Rectangle Object