Table of contents
TOC
Collapse the table of content
Expand the table of content

Shape.LockAspectRatio Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

Returns or sets an MsoTriStateconstant 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.

Dim shp As Shape 

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

shp.LockAspectRatio = msoTrue
© 2018 Microsoft