Table of Contents

Method Merge

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

Merge(WordDocument, WordDocument, MergeOptions?)

Appends every section of source to destination, remapping the style, numbering, note, bookmark and relationship ids that collide.

public static IReadOnlyList<Section> Merge(this WordDocument destination, WordDocument source, MergeOptions? options = null)

Parameters

destination WordDocument

The document receiving the content.

source WordDocument

The document being imported. It is not modified.

options MergeOptions

The merge options, or null for the defaults.

Returns

IReadOnlyList<Section>

The imported sections, in order, as they now exist in the destination.

Exceptions

ArgumentNullException

An argument is null.

ArgumentException

source and destination are the same document.

InvalidDocumentException

The source's media cannot be read because its package is already closed.