Method ResizeShape
ResizeShape(WordDocument, ShapeRef, Emu, Emu)
Resizes a shape, as dragging its handles or the Size boxes of Shape Format do.
public static DocumentEdit ResizeShape(this WordDocument document, ShapeRef shape, Emu width, Emu height)
Parameters
documentWordDocumentThe document that holds the shape.
shapeShapeRefThe shape.
widthEmuThe width.
heightEmuThe height.
Returns
- DocumentEdit
The edit; the size the shape already has gives an empty edit.
Exceptions
- ArgumentNullException
documentorshapeis null.- ArgumentException
The shape is not in
documentor not in a paragraph.- ArgumentOutOfRangeException
A side is not above zero or above MaxImageSide.
- InvalidOperationException
The shape is not one DrawingML shape or one group of them (a group's children scale with it, Phase 179), or it is in a shape's text box.