Word.Interfaces.ShapeUpdateData interface

An interface for updating data on the Shape object, for use in shape.set({ ... }).

Properties

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

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.

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.

relativeVerticalPosition

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

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.

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.

width

The width, in points, of the shape.

Property Details

body

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Represents the body object of the shape. Only applies to text boxes and geometric shapes.

body?: Word.Interfaces.BodyUpdateData;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

canvas

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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.CanvasUpdateData;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

fill

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Returns the fill formatting of this shape.

fill?: Word.Interfaces.ShapeFillUpdateData;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

geometricShapeType

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

geometricShapeType?: Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus";

Property Value

Word.GeometricShapeType | "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

height

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The height, in points, of the shape.

height?: number;

Property Value

number

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

left

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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?: number;

Property Value

number

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

name

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The name of the shape.

name?: string;

Property Value

string

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

parentCanvas

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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.ShapeUpdateData;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

parentGroup

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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.ShapeUpdateData;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

relativeHorizontalPosition

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

relativeHorizontalPosition?: Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin";

Property Value

Word.RelativeHorizontalPosition | "Margin" | "Page" | "Column" | "Character" | "LeftMargin" | "RightMargin" | "InsideMargin" | "OutsideMargin"

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

relativeVerticalPosition

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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

relativeVerticalPosition?: Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin";

Property Value

Word.RelativeVerticalPosition | "Margin" | "Page" | "Paragraph" | "Line" | "TopMargin" | "BottomMargin" | "InsideMargin" | "OutsideMargin"

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

shapeGroup

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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.ShapeGroupUpdateData;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

textFrame

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

Gets the text frame object of the shape.

textFrame?: Word.Interfaces.TextFrameUpdateData;

Property Value

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

top

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

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?: number;

Property Value

number

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]

width

Note

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

The width, in points, of the shape.

width?: number;

Property Value

number

Remarks

[ API set: WordApi BETA (PREVIEW ONLY) ]