Muokkaa

Jaa


ShapeRange.ScaleWidth method (PowerPoint)

Scales the width of the shapes in the range by a specified factor.

Syntax

expression.ScaleWidth (Factor, RelativeToOriginalSize, fScale)

expression A variable that represents a ShapeRange object.

Parameters

Name Required/Optional Data type Description
Factor Required Single Specifies the ratio between the width of the shapes after you resize them and the current or original width. For example, to make all the shapes in the range 50 percent larger, specify 1.5 for this parameter.
RelativeToOriginalSize Required MsoTriState Specifies whether shapes are scaled relative to their current or original size.
fScale Optional MsoScaleFrom The parts of the shapes that retain their positions when the shapes are scaled.

Remarks

For pictures and OLE objects, you can indicate whether you want to scale the shapes relative to the original size or relative to the current size. Shapes other than pictures and OLE objects are always scaled relative to their current width.

The RelativeToOriginalSize parameter value can be one of the following MsoTriState constants. You can specify msoTrue for this parameter only if the specified shapes are pictures or OLE objects.

Constant Description
msoFalse Scales the shape relative to its current size.
msoTrue Scales the shape relative to its original size.

The fScale parameter value can be one of the following MsoScaleFrom constants. The default is msoScaleFromTopLeft.

msoScaleFromBottomRight
msoScaleFromMiddle
msoScaleFromTopLeft

See also

ShapeRange Object

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.