Edit

Share via


PowerPoint.Interfaces.ShapeLoadOptions interface

Represents a single shape in the slide.

Remarks

[ API set: PowerPointApi 1.3 ]

Properties

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

fill

Returns the fill formatting of this shape.

group

Returns the ShapeGroup associated with the shape. If the shape type isn't group, then this method returns the GeneralException error.

height

Specifies the height, in points, of the shape. Throws an InvalidArgument exception when set with a negative value.

id

Gets the unique ID of the shape.

left

The distance, in points, from the left side of the shape to the left side of the slide.

level

Returns the level of the specified shape.

  • A level of 0 means the shape isn't part of a group.

  • A level of 1 means the shape is part of a top-level group.

  • A level greater than 1 indicates the shape is a nested group.

lineFormat

Returns the line formatting of this shape.

name

Specifies the name of this shape.

parentGroup

Returns the parent group of this shape. If the shape isn't part of a group, then this method returns the GeneralException error.

placeholderFormat

Returns the properties that apply specifically to this placeholder. If the shape type isn't placeholder, then this method returns the GeneralException error.

textFrame

Returns the text frame object of this shape.

top

The distance, in points, from the top edge of the shape to the top edge of the slide.

type

Returns the type of this shape. See PowerPoint.ShapeType for details.

width

Specifies the width, in points, of the shape. Throws an InvalidArgument exception when set with a negative value.

zOrderPosition

Returns the z-order position of the shape, with 0 representing the bottom of the order stack. Every shape on a slide has a unique z-order, but each slide also has a unique z-order stack, so two shapes on separate slides could have the same z-order number.

Property Details

$all

Specifying $all for the load options loads all the scalar properties (such as Range.address) but not the navigational properties (such as Range.format.fill.color).

$all?: boolean;

Property Value

boolean

fill

Returns the fill formatting of this shape.

fill?: PowerPoint.Interfaces.ShapeFillLoadOptions;

Property Value

Remarks

[ API set: PowerPointApi 1.4 ]

group

Returns the ShapeGroup associated with the shape. If the shape type isn't group, then this method returns the GeneralException error.

group?: PowerPoint.Interfaces.ShapeGroupLoadOptions;

Property Value

Remarks

[ API set: PowerPointApi 1.8 ]

height

Specifies the height, in points, of the shape. Throws an InvalidArgument exception when set with a negative value.

height?: boolean;

Property Value

boolean

Remarks

[ API set: PowerPointApi 1.4 ]

id

Gets the unique ID of the shape.

id?: boolean;

Property Value

boolean

Remarks

[ API set: PowerPointApi 1.3 ]

left

The distance, in points, from the left side of the shape to the left side of the slide.

left?: boolean;

Property Value

boolean

Remarks

[ API set: PowerPointApi 1.4 ]

level

Returns the level of the specified shape.

  • A level of 0 means the shape isn't part of a group.

  • A level of 1 means the shape is part of a top-level group.

  • A level greater than 1 indicates the shape is a nested group.

level?: boolean;

Property Value

boolean

Remarks

[ API set: PowerPointApi 1.8 ]

lineFormat

Returns the line formatting of this shape.

lineFormat?: PowerPoint.Interfaces.ShapeLineFormatLoadOptions;

Property Value

Remarks

[ API set: PowerPointApi 1.4 ]

name

Specifies the name of this shape.

name?: boolean;

Property Value

boolean

Remarks

[ API set: PowerPointApi 1.4 ]

parentGroup

Returns the parent group of this shape. If the shape isn't part of a group, then this method returns the GeneralException error.

parentGroup?: PowerPoint.Interfaces.ShapeLoadOptions;

Property Value

Remarks

[ API set: PowerPointApi 1.8 ]

placeholderFormat

Returns the properties that apply specifically to this placeholder. If the shape type isn't placeholder, then this method returns the GeneralException error.

placeholderFormat?: PowerPoint.Interfaces.PlaceholderFormatLoadOptions;

Property Value

Remarks

[ API set: PowerPointApi 1.8 ]

textFrame

Returns the text frame object of this shape.

textFrame?: PowerPoint.Interfaces.TextFrameLoadOptions;

Property Value

Remarks

[ API set: PowerPointApi 1.4 ]

top

The distance, in points, from the top edge of the shape to the top edge of the slide.

top?: boolean;

Property Value

boolean

Remarks

[ API set: PowerPointApi 1.4 ]

type

Returns the type of this shape. See PowerPoint.ShapeType for details.

type?: boolean;

Property Value

boolean

Remarks

[ API set: PowerPointApi 1.4 ]

width

Specifies the width, in points, of the shape. Throws an InvalidArgument exception when set with a negative value.

width?: boolean;

Property Value

boolean

Remarks

[ API set: PowerPointApi 1.4 ]

zOrderPosition

Returns the z-order position of the shape, with 0 representing the bottom of the order stack. Every shape on a slide has a unique z-order, but each slide also has a unique z-order stack, so two shapes on separate slides could have the same z-order number.

zOrderPosition?: boolean;

Property Value

boolean

Remarks

[ API set: PowerPointApi 1.8 ]