Edit

Share via


Word.Interfaces.ShapeLoadOptions interface

Represents a shape in the header, footer, or document body. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases.

Remarks

[ API set: WordApiDesktop 1.2 ]

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

allowOverlap

Specifies whether a given shape can overlap other shapes.

altTextDescription

Specifies a string that represents the alternative text associated with the shape.

body

Gets the Body object of the shape. Only applies to text boxes and geometric shapes.

canvas

Gets the canvas associated with the shape. An object with its isNullObject property set to true will be returned if the shape type isn't canvas. For further information, see *OrNullObject methods and properties.

fill

Returns the fill formatting of the shape.

geometricShapeType

Specifies the geometric shape type of the shape. It will be null if isn't a geometric shape.

height

Specifies the height, in points, of the shape.

heightRelative

Specifies the percentage of shape height to the relative vertical size (that is, the relativeVerticalSize property). For an inline or child shape, it can't be set.

id

Gets an integer that represents the shape identifier.

isChild

Check whether this shape is a child of a group shape or a canvas shape.

left

Specifies the distance, in points, from the left side of the shape to the relative horizontal position (that is, the relativeHorizontalPosition property). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner.

leftRelative

Specifies the relative left position as a percentage from the left side of the shape to the relative horizontal position (that is, the relativeHorizontalalPosition property). For an inline or child shape, it will return 0 and can't be set.

lockAspectRatio

Specifies if the aspect ratio of this shape is locked.

name

Specifies the name of the shape.

parentCanvas

Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas.

parentGroup

Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group.

relativeHorizontalPosition

Specifies the relative horizontal position of the shape. For an inline shape, it can't be set. For details, see Word.RelativeHorizontalPosition.

relativeHorizontalSize

Specifies the relative horizontal size of the shape. Use with the widthRelative property. For an inline or child shape, it can't be set.

relativeVerticalPosition

Specifies the relative vertical position of the shape. For an inline shape, it can't be set. For details, see Word.RelativeVerticalPosition.

relativeVerticalSize

Specifies the relative vertical size of the shape. Use with the heightRelative property. For an inline or child shape, it can't be set.

rotation

Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape.

shapeGroup

Gets the shape group associated with the shape. An object with its isNullObject property set to true will be returned if the shape type isn't groupShape. For further information, see *OrNullObject methods and properties.

textFrame

Gets the TextFrame object of the shape.

textWrap

Returns the text wrap formatting of the shape.

top

Specifies the distance, in points, from the top edge of the shape to the relative vertical position (that is, the relativeVerticalPosition property). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner.

topRelative

Specifies the relative top position as a percentage from the top edge of the shape to the relative vertical position (that is, the relativeVerticalPosition property). For an inline or child shape, it will return 0 and can't be set.

type

Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases.

visible

Specifies if the shape is visible. Not applicable to inline shapes.

width

Specifies the width, in points, of the shape.

widthRelative

Specifies the percentage of shape width to the relative horizontal size (that is, the relativeHorizontalSize property). For an inline or child shape, it can't be set.

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

allowOverlap

Specifies whether a given shape can overlap other shapes.

allowOverlap?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

altTextDescription

Specifies a string that represents the alternative text associated with the shape.

altTextDescription?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

body

Gets the Body object of the shape. Only applies to text boxes and geometric shapes.

body?: Word.Interfaces.BodyLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.2 ]

canvas

Gets the canvas associated with the shape. An object with its isNullObject property set to true will be returned if the shape type isn't canvas. For further information, see *OrNullObject methods and properties.

canvas?: Word.Interfaces.CanvasLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.2 ]

fill

Returns the fill formatting of the shape.

fill?: Word.Interfaces.ShapeFillLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.2 ]

geometricShapeType

Specifies the geometric shape type of the shape. It will be null if isn't a geometric shape.

geometricShapeType?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

height

Specifies the height, in points, of the shape.

height?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

heightRelative

Specifies the percentage of shape height to the relative vertical size (that is, the relativeVerticalSize property). For an inline or child shape, it can't be set.

heightRelative?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

id

Gets an integer that represents the shape identifier.

id?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

isChild

Check whether this shape is a child of a group shape or a canvas shape.

isChild?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

left

Specifies the distance, in points, from the left side of the shape to the relative horizontal position (that is, the relativeHorizontalPosition property). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner.

left?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

leftRelative

Specifies the relative left position as a percentage from the left side of the shape to the relative horizontal position (that is, the relativeHorizontalalPosition property). For an inline or child shape, it will return 0 and can't be set.

leftRelative?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

lockAspectRatio

Specifies if the aspect ratio of this shape is locked.

lockAspectRatio?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

name

Specifies the name of the shape.

name?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

parentCanvas

Gets the top-level parent canvas shape of this child shape. It will be null if it isn't a child shape of a canvas.

parentCanvas?: Word.Interfaces.ShapeLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.2 ]

parentGroup

Gets the top-level parent group shape of this child shape. It will be null if it isn't a child shape of a group.

parentGroup?: Word.Interfaces.ShapeLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.2 ]

relativeHorizontalPosition

Specifies the relative horizontal position of the shape. For an inline shape, it can't be set. For details, see Word.RelativeHorizontalPosition.

relativeHorizontalPosition?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

relativeHorizontalSize

Specifies the relative horizontal size of the shape. Use with the widthRelative property. For an inline or child shape, it can't be set.

relativeHorizontalSize?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

relativeVerticalPosition

Specifies the relative vertical position of the shape. For an inline shape, it can't be set. For details, see Word.RelativeVerticalPosition.

relativeVerticalPosition?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

relativeVerticalSize

Specifies the relative vertical size of the shape. Use with the heightRelative property. For an inline or child shape, it can't be set.

relativeVerticalSize?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

rotation

Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape.

rotation?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

shapeGroup

Gets the shape group associated with the shape. An object with its isNullObject property set to true will be returned if the shape type isn't groupShape. For further information, see *OrNullObject methods and properties.

shapeGroup?: Word.Interfaces.ShapeGroupLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.2 ]

textFrame

Gets the TextFrame object of the shape.

textFrame?: Word.Interfaces.TextFrameLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.2 ]

textWrap

Returns the text wrap formatting of the shape.

textWrap?: Word.Interfaces.ShapeTextWrapLoadOptions;

Property Value

Remarks

[ API set: WordApiDesktop 1.2 ]

top

Specifies the distance, in points, from the top edge of the shape to the relative vertical position (that is, the relativeVerticalPosition property). For an inline shape, it will return 0 and can't be set. For a child shape in a canvas or group, it's relative to the top left corner.

top?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

topRelative

Specifies the relative top position as a percentage from the top edge of the shape to the relative vertical position (that is, the relativeVerticalPosition property). For an inline or child shape, it will return 0 and can't be set.

topRelative?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

type

Gets the shape type. Currently, only the following shapes are supported: text boxes, geometric shapes, groups, pictures, and canvases.

type?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

visible

Specifies if the shape is visible. Not applicable to inline shapes.

visible?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

width

Specifies the width, in points, of the shape.

width?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

widthRelative

Specifies the percentage of shape width to the relative horizontal size (that is, the relativeHorizontalSize property). For an inline or child shape, it can't be set.

widthRelative?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]