Table of Contents

Enum DocxMailMergeIssueKind

Namespace
DocToolkit
Assembly
DocToolkit.Docx.dll

The kinds of template problem this API distinguishes.

public enum DocxMailMergeIssueKind

Fields

MalformedField = 1

The field is not a usable MERGEFIELD — measured with an instruction carrying no field name, which reports "A MERGEFIELD instruction must contain exactly one field name."

MismatchedConditionalEnd = 6

A conditional block's end marker closed a different block name than the current start marker.

MismatchedRepeatingBlockEnd = 10

A repeating block's end marker closed a different block name than the current start marker.

MissingConditionalValue = 3

A conditional block ({{#Name}}) was found without a supplied condition.

MissingRepeatingBlockData = 7

A repeating block ({{#each Name}}) was found without supplied rows.

Other = 0

A problem this API does not distinguish by its own kind — currently only a MERGEFIELD missing its value in a supplied-names inspection. Read Message.

UnmatchedConditionalEnd = 5

A conditional block's end marker ({{/Name}}) has no matching start marker.

UnmatchedConditionalStart = 4

A conditional block's start marker ({{#Name}}) has no matching end marker.

UnmatchedRepeatingBlockEnd = 9

A repeating block's end marker ({{/each Name}}) has no matching start marker.

UnmatchedRepeatingBlockStart = 8

A repeating block's start marker ({{#each Name}}) has no matching end marker.

UnsupportedFormatting = 2

The field asks for formatting this engine does not apply.

UnsupportedMailMergeControlField = 11

A Word-native mail-merge control field was found that this engine does not execute.

Remarks

The underlying library reports twelve kinds; this names eleven of them and collapses one. Other now covers only MissingMergeFieldValue — a field-level gap unrelated to conditional blocks or repeating regions, and out of scope for the ticket that named the other nine. Before conditional-block and repeating-block execution shipped, all nine of those arrived as Other too, because surfacing them by name would have advertised capabilities a caller could not reach — see MergeConditional(byte[], IReadOnlyDictionary<string, bool>) and MergeRepeating(byte[], IReadOnlyDictionary<string, IEnumerable<IReadOnlyDictionary<string, string>>>), which is why that is no longer true.