Left Property
Left property as it applies to the Shape and ShapeRange objects.
WdShapePosition
WdShapePosition can be one of these WdShapePosition constants. |
WdShapeBottom |
WdShapeCenter |
WdShapeInside |
WdShapeLeft |
WdShapeOutside |
WdShapeRight |
WdShapeTop |
expression.Left
expression Required. An expression that returns one of the above objects.
Remarks
The position of a shape is measured from the upper-left corner of the shape's bounding box to the shape's anchor. The RelativeHorizontalPosition property controls whether the anchor is positioned alongside a character, column, margin, or the edge of the page.
For a ShapeRange object that contains more than one shape, the Left property sets the horizontal position of each shape.
Left property as it applies to the Application, Task, and Window objects.
Returns or sets a Long that represents the horizontal position of the active document (for the Application object) or the specified task or window, measured in points. Read/write.
expression.Left
expression Required. An expression that returns one of the above objects.
Left property as it applies to the Page object.
The Top and Left properties of the Page object always return 0 (zero) indicating the upper left corner of the page. The Height and Width properties return the height and width in points (72 points = 1 inch) of the paper size specified in the Page Setup dialog or through the PageSetup object. For example, for an 8-1/2 by 11 inch page in portrait mode, the Height property returns 792 and the Width property returns 612. All four of these properties are read-only.
Example
As it applies to the Shape object.
This example sets the horizontal position of the first shape in the active document to 1 inch from the left edge of the page.
With ActiveDocument.Shapes(1)
.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionPage
.Left = InchesToPoints(1)
End With
This example sets the horizontal position of the first and second shapes in the active document to 1 inch from the left edge of the column.
With ActiveDocument.Shapes.Range(Array(1, 2))
.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
.Left = InchesToPoints(1)
End With
As it applies to the Window object.
This example sets the horizontal position of the active window to 100 points.
With ActiveDocument.ActiveWindow
.WindowState = wdWindowStateNormal
.Left = 100
.Top = 0
End With
Applies to | Application Object | Line Object | Page Object | Rectangle Object | Shape Object | ShapeRange Collection Object | Task Object | Window Object
See Also | AddShape Method | Anchor Property | Height Property | RelativeHorizontalPosition Property | Top Property | Width Property