Table of Contents

Method CopyImage

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

CopyImage(WordDocument, ImageRef, DocumentPosition)

Puts a copy of a picture at a position, as Ctrl+dragging it does in Word.

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

Parameters

document WordDocument

The document that holds the picture.

image ImageRef

The picture.

to DocumentPosition

Where the copy goes.

Returns

DocumentEdit

The edit; After is just past the copy.

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