Compartir a través de


Shape.ScaleWidth Method

Scales the width of the shape by a specified factor. For pictures and OLE objects, you can indicate whether you want to scale the shape 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.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
Sub ScaleWidth ( _
    Factor As Single, _
    RelativeToOriginalSize As MsoTriState, _
    fScale As MsoScaleFrom _
)
'Usage
Dim instance As Shape
Dim Factor As Single
Dim RelativeToOriginalSize As MsoTriState
Dim fScale As MsoScaleFrom

instance.ScaleWidth(Factor, RelativeToOriginalSize, _
    fScale)
void ScaleWidth(
    float Factor,
    MsoTriState RelativeToOriginalSize,
    MsoScaleFrom fScale
)

Parameters

  • Factor
    Type: System.Single
    Specifies the ratio between the width of the shape after you resize it and the current or original width. For example, to make a rectangle 50 percent larger, specify 1.5 for this argument.

Remarks

For pictures and OLE objects, you can indicate whether you want to scale the shape 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 shape is a picture or an OLE object.

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 MsoTriState constants. The default is msoScaleFromTopLeft.

msoScaleFromBottomRight

msoScaleFromMiddle

msoScaleFromTopLeft

See Also

Reference

Shape Interface

Shape Members

Microsoft.Office.Interop.PowerPoint Namespace