Enum DocxMailMergeIssueKind
- Namespace
- DocToolkit
- Assembly
- DocToolkit.Docx.dll
The kinds of template problem this API distinguishes.
public enum DocxMailMergeIssueKind
Fields
MalformedField = 1The 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 = 6A conditional block's end marker closed a different block name than the current start marker.
MismatchedRepeatingBlockEnd = 10A repeating block's end marker closed a different block name than the current start marker.
MissingConditionalValue = 3A conditional block (
{{#Name}}) was found without a supplied condition.MissingRepeatingBlockData = 7A repeating block (
{{#each Name}}) was found without supplied rows.Other = 0A 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 = 5A conditional block's end marker (
{{/Name}}) has no matching start marker.UnmatchedConditionalStart = 4A conditional block's start marker (
{{#Name}}) has no matching end marker.UnmatchedRepeatingBlockEnd = 9A repeating block's end marker (
{{/each Name}}) has no matching start marker.UnmatchedRepeatingBlockStart = 8A repeating block's start marker (
{{#each Name}}) has no matching end marker.UnsupportedFormatting = 2The field asks for formatting this engine does not apply.
UnsupportedMailMergeControlField = 11A 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.