Table of Contents

Property RemoveEmptyParagraphs

Namespace
DocWright.MailMerge
Assembly
DocWright.MailMerge.dll

RemoveEmptyParagraphs

Gets or sets whether a paragraph left empty by the merge is removed. Defaults to true, matching Word.

public bool RemoveEmptyParagraphs { get; set; }

Property Value

bool

Remarks

Only paragraphs that became empty because every merge field in them merged to nothing. A paragraph that was already empty in the template was put there on purpose and stays, and so does one that holds literal text beside the field.

This is Word's SuppressBlankLines, which is on by default. Measured: a paragraph holding only an empty «MiddleName» disappears from Word's merged output, while a paragraph reading mid=«MiddleName» survives as mid=. An address block with an optional second line is the case this exists for.