Method ValidateMergeRegions
ValidateMergeRegions(WordDocument)
Validates a template's region markers, throwing if they are unbalanced or crossed.
public static void ValidateMergeRegions(this WordDocument document)
Parameters
documentWordDocumentThe 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
documentis null.- MergeTemplateException
A region marker is unbalanced or crossed, or two regions overlap. The exception names the region.