Table of Contents

Method SetShapeGeometry

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

SetShapeGeometry(WordDocument, ShapeRef, string)

Changes a shape to another preset, as Word's Change Shape does; the preset's own adjust values apply.

public static DocumentEdit SetShapeGeometry(this WordDocument document, ShapeRef shape, string preset)

Parameters

document WordDocument

The document that holds the shape.

shape ShapeRef

The shape.

preset string

The preset geometry, one of Names.

Returns

DocumentEdit

The edit; the preset the shape already is, with no adjust values, gives an empty edit.

Exceptions

ArgumentNullException

document, shape or preset is null.

ArgumentException

The shape is not in document or not in a paragraph; the preset is not one the format has.

InvalidOperationException

The shape is not one DrawingML shape, or it is in a shape's text box.