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
Properties
| $all | Specifying |
| allow |
Specifies whether a given shape can overlap other shapes. |
| alt |
Specifies a string that represents the alternative text associated with the shape. |
| body | Gets the |
| canvas | Gets the canvas associated with the shape. An object with its |
| fill | Returns the fill formatting of the shape. |
| geometric |
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. |
| height |
Specifies the percentage of shape height to the relative vertical size (that is, the |
| id | Gets an integer that represents the shape identifier. |
| is |
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 |
| left |
Specifies the relative left position as a percentage from the left side of the shape to the relative horizontal position (that is, the |
| lock |
Specifies if the aspect ratio of this shape is locked. |
| name | Specifies the name of the shape. |
| parent |
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. |
| parent |
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. |
| relative |
Specifies the relative horizontal position of the shape. For an inline shape, it can't be set. For details, see Word.RelativeHorizontalPosition. |
| relative |
Specifies the relative horizontal size of the shape. Use with the |
| relative |
Specifies the relative vertical position of the shape. For an inline shape, it can't be set. For details, see Word.RelativeVerticalPosition. |
| relative |
Specifies the relative vertical size of the shape. Use with the |
| rotation | Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape. |
| shape |
Gets the shape group associated with the shape. An object with its |
| text |
Gets the |
| text |
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 |
| top |
Specifies the relative top position as a percentage from the top edge of the shape to the relative vertical position (that is, the |
| 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. |
| width |
Specifies the percentage of shape width to the relative horizontal size (that is, the |
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
altTextDescription
Specifies a string that represents the alternative text associated with the shape.
altTextDescription?: boolean;
Property Value
boolean
Remarks
body
Gets the Body object of the shape. Only applies to text boxes and geometric shapes.
body?: Word.Interfaces.BodyLoadOptions;
Property Value
Remarks
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
fill
Returns the fill formatting of the shape.
fill?: Word.Interfaces.ShapeFillLoadOptions;
Property Value
Remarks
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
height
Specifies the height, in points, of the shape.
height?: boolean;
Property Value
boolean
Remarks
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
id
Gets an integer that represents the shape identifier.
id?: boolean;
Property Value
boolean
Remarks
isChild
Check whether this shape is a child of a group shape or a canvas shape.
isChild?: boolean;
Property Value
boolean
Remarks
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
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
lockAspectRatio
Specifies if the aspect ratio of this shape is locked.
lockAspectRatio?: boolean;
Property Value
boolean
Remarks
name
Specifies the name of the shape.
name?: boolean;
Property Value
boolean
Remarks
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
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
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
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
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
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
rotation
Specifies the rotation, in degrees, of the shape. Not applicable to Canvas shape.
rotation?: boolean;
Property Value
boolean
Remarks
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
textFrame
Gets the TextFrame object of the shape.
textFrame?: Word.Interfaces.TextFrameLoadOptions;
Property Value
Remarks
textWrap
Returns the text wrap formatting of the shape.
textWrap?: Word.Interfaces.ShapeTextWrapLoadOptions;
Property Value
Remarks
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
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
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
visible
Specifies if the shape is visible. Not applicable to inline shapes.
visible?: boolean;
Property Value
boolean
Remarks
width
Specifies the width, in points, of the shape.
width?: boolean;
Property Value
boolean
Remarks
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