Method Merge
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
destinationWordDocumentThe document receiving the content.
sourceWordDocumentThe document being imported. It is not modified.
optionsMergeOptionsThe 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
sourceanddestinationare the same document.- InvalidDocumentException
The source's media cannot be read because its package is already closed.