Table of Contents

Method MoveImage

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

MoveImage(WordDocument, ImageRef, DocumentPosition)

Moves a picture to a position, as dragging it does in Word.

public static DocumentEdit MoveImage(this WordDocument document, ImageRef image, DocumentPosition to)

Parameters

document WordDocument

The document that holds the picture.

image ImageRef

The picture.

to DocumentPosition

Where it goes, as the position is before the move.

Returns

DocumentEdit

The edit; After is just past the picture at its new place. A position just before or just after the picture moves nothing and gives an empty edit.

Exceptions

ArgumentNullException

document or image is null.

ArgumentException

The picture or the position is not in document, the position is in another package part than the picture (a header, a note), or falls inside a surrogate pair.

InvalidOperationException

The position is inside content a reader synthesized, or the picture or the position is in a shape's text box.