Table of Contents

Class MailMergeExtensions

Namespace
DocWright.MailMerge
Assembly
DocWright.MailMerge.dll

Executes a mail merge over a DocWright document.

public static class MailMergeExtensions
Inheritance
MailMergeExtensions
Inherited Members

Remarks

Built entirely on the existing seams: FieldDiscovery locates the fields, FieldConditional supplies Word's comparison semantics, and P14's UpdateFields evaluates whatever the merge does not substitute itself. Nothing in DocWright.Core changes for mail merge, and this package has no third-party dependency -- not even System.Data.

Merged output is ordinary DOM, so it round-trips through the writer exactly as any other document does.

Methods

Execute(WordDocument, IMergeDataReader, MailMergeOptions?)

Merges records into the document in place.

Execute(WordDocument, IDictionary<string, object?>, MailMergeOptions?)

Merges one record into the document in place.

GetMergeFieldNames(WordDocument)

Lists the merge fields in a document, without merging anything.

GetMergeRegionNames(WordDocument)

Lists the merge region names a template declares, outermost first.

ValidateMergeRegions(WordDocument)

Validates a template's region markers, throwing if they are unbalanced or crossed.