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

Represents 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

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

height

The height, in points, of the shape.

heightRelative

The percentage of shape height to vertical relative size, see Word.RelativeSize. 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

The distance, in points, from the left side of the shape to the horizontal relative position, see Word.RelativeHorizontalPosition. 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

The relative left position as a percentage from the left side of the shape to the horizontal relative position, see Word.RelativeHorizontalPosition. 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

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

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

relativeHorizontalSize

The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see Word.RelativeHorizontalPosition.

relativeVerticalPosition

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

relativeVerticalSize

The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see Word.RelativeHorizontalPosition.

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 text frame object of the shape.

textWrap

Returns the text wrap formatting of the shape.

top

The distance, in points, from the top edge of the shape to the vertical relative position, see Word.RelativeVerticalPosition. 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

The relative top position as a percentage from the top edge of the shape to the vertical relative position, see Word.RelativeVerticalPosition. 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

The width, in points, of the shape.

widthRelative

The percentage of shape width to horizontal relative size, see Word.RelativeSize. 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

Represents 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

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

The height, in points, of the shape.

height?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

heightRelative

The percentage of shape height to vertical relative size, see Word.RelativeSize. 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

The distance, in points, from the left side of the shape to the horizontal relative position, see Word.RelativeHorizontalPosition. 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

The relative left position as a percentage from the left side of the shape to the horizontal relative position, see Word.RelativeHorizontalPosition. 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

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

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

The relative horizontal size of the shape. For an inline or child shape, it can't be set. For details, see Word.RelativeHorizontalPosition.

relativeHorizontalSize?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

relativeVerticalPosition

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

The relative vertical size of the shape. For an inline or child shape, it can't be set. For details, see Word.RelativeHorizontalPosition.

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 text frame 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

The distance, in points, from the top edge of the shape to the vertical relative position, see Word.RelativeVerticalPosition. 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

The relative top position as a percentage from the top edge of the shape to the vertical relative position, see Word.RelativeVerticalPosition. 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

The width, in points, of the shape.

width?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]

widthRelative

The percentage of shape width to horizontal relative size, see Word.RelativeSize. For an inline or child shape, it can't be set.

widthRelative?: boolean;

Property Value

boolean

Remarks

[ API set: WordApiDesktop 1.2 ]