Export (0) Print
Expand All

Shape.LockAspectRatio Property

Office 2007
Returns or sets an MsoTriState constant indicating whether the specified shape retains its original proportions when you resize it. Read/write.

Syntax

expression.LockAspectRatio

expression   A variable that represents a Shape object.

Remarks

The LockAspectRatio property value can be one of the MsoTriState constants declared in the Microsoft Office type library and shown in the following table.

ConstantDescription
msoFalseThe height and width of the shape change independently of one another when you resize it.
msoTriStateMixedReturn value indicating a combination of msoTrue and msoFalse for the specified shape range.
msoTriStateToggleSet value that switches between msoTrue and msoFalse.
msoTrueThe specified shape retains its original proportions when you resize it.

Example

This example adds a cube to the active publication. The cube can be moved and resized, but not reproportioned.

Visual Basic for Applications
Dim shp As Shape

Set shp = ActiveDocument.Pages(1).Shapes _
    .AddShape(Type:=msoShapeCube, _
    Left:=50, Top:=50, Width:=100, Height:=200) _

shp.LockAspectRatio = msoTrue

See Also


Community Additions

ADD
Show:
© 2014 Microsoft