MailMergeCleanupOptions Property

Gets or sets a set of flags that specify what items should be removed during mail merge.

Namespace:  Aspose.Words.MailMerging
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.9.0

Syntax

public MailMergeCleanupOptions CleanupOptions { get; set; }

Property Value

Type: MailMergeCleanupOptions

Examples

Shows how to automatically remove unmerged merge fields during mail merge.
doc.MailMerge.CleanupOptions = MailMergeCleanupOptions.RemoveUnusedFields;
Shows how to make sure empty paragraphs that result from merging fields with no data are removed from the document.
doc.MailMerge.CleanupOptions = MailMergeCleanupOptions.RemoveEmptyParagraphs;
Shows how to instruct the mail merge engine to remove any containing fields from around a merge field during mail merge.
doc.MailMerge.CleanupOptions = MailMergeCleanupOptions.RemoveContainingFields;

See Also