Table of Contents

Method ValidateMergeRegions

Namespace
DocWright.MailMerge
Assembly
DocWright.MailMerge.dll

ValidateMergeRegions(WordDocument)

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

public static void ValidateMergeRegions(this WordDocument document)

Parameters

document WordDocument

The template.

Remarks

Available separately so a host can reject a bad template before it has any data, which is when the author is still looking at it.

Exceptions

ArgumentNullException

document is null.

MergeTemplateException

A region marker is unbalanced or crossed, or two regions overlap. The exception names the region.