ShapeRange.LockAspectRatio property (Publisher)

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 ShapeRange 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.

Constant Description
msoFalse The height and width of the shape change independently of one another when you resize it.
msoTriStateMixed A return value indicating a combination of msoTrue and msoFalse for the specified shape range.
msoTriStateToggle A set value that switches between msoTrue and msoFalse.
msoTrue The 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.

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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.