Class MailMergeOptions

Class MailMergeOptions

Namespace: Aspose.Words.LowCode
Assembly: Aspose.Words.dll (25.2.0)

Represents options for the mail merge functionality.

public class MailMergeOptions

Inheritance

objectMailMergeOptions

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

MailMergeOptions()

public MailMergeOptions()

Properties

CleanupOptions

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

public MailMergeCleanupOptions CleanupOptions { get; set; }

Property Value

MailMergeCleanupOptions

CleanupParagraphsWithPunctuationMarks

Gets or sets a value indicating whether paragraphs with punctuation marks are considered as empty and should be removed if the Aspose.Words.MailMerging.MailMergeCleanupOptions.RemoveEmptyParagraphs option is specified.

public bool CleanupParagraphsWithPunctuationMarks { get; set; }

Property Value

bool

Remarks

The default value is true.

MergeDuplicateRegions

Gets or sets a value indicating whether all of the document mail merge regions with the name of a data source should be merged while executing of a mail merge with regions against the data source or just the first one.

public bool MergeDuplicateRegions { get; set; }

Property Value

bool

Remarks

The default value is false.

MergeWholeDocument

Gets or sets a value indicating whether fields in whole document are updated while executing of a mail merge with regions.

public bool MergeWholeDocument { get; set; }

Property Value

bool

Remarks

The default value is false.

PreserveUnusedTags

Gets or sets a value indicating whether the unused “mustache” tags should be preserved.

public bool PreserveUnusedTags { get; set; }

Property Value

bool

Remarks

The default value is false.

See Also

MailMergeOptions.UseNonMergeFields

RegionEndTag

Gets or sets a mail merge region end tag.

public string RegionEndTag { get; set; }

Property Value

string

RegionStartTag

Gets or sets a mail merge region start tag.

public string RegionStartTag { get; set; }

Property Value

string

RestartListsAtEachSection

Gets or sets a value indicating whether lists are restarted at each section after executing of a mail merge.

public bool RestartListsAtEachSection { get; set; }

Property Value

bool

Remarks

The default value is true.

RetainFirstSectionStart

Gets or sets a value indicating whether the section start of the first document section and its copies for subsequent data source rows are retained during mail merge or updated according to MS Word behaviour.

public bool RetainFirstSectionStart { get; set; }

Property Value

bool

Remarks

The default value is true.

TrimWhitespaces

Gets or sets a value indicating whether trailing and leading whitespaces are trimmed from mail merge values.

public bool TrimWhitespaces { get; set; }

Property Value

bool

Remarks

The default value is true.

UnconditionalMergeFieldsAndRegions

Gets or sets a value indicating whether merge fields and merge regions are merged regardless of the parent IF field’s condition.

public bool UnconditionalMergeFieldsAndRegions { get; set; }

Property Value

bool

Remarks

The default value is false.

UseNonMergeFields

When true, specifies that in addition to MERGEFIELD fields, mail merge is performed into some other types of fields and also into “{{fieldName}}” tags.

public bool UseNonMergeFields { get; set; }

Property Value

bool

Remarks

Normally, mail merge is only performed into MERGEFIELD fields, but several customers had their reporting built using other fields and had many documents created this way. To simplify migration (and because this approach was independently used by several customers) the ability to mail merge into other fields was introduced.

When Aspose.Words.LowCode.MailMergeOptions.UseNonMergeFields is set to true, Aspose.Words will perform mail merge into the following fields:

MERGEFIELD FieldName

MACROBUTTON NOMACRO FieldName

IF 0 = 0 "{FieldName}" ""

Also, when Aspose.Words.LowCode.MailMergeOptions.UseNonMergeFields is set to true, Aspose.Words will perform mail merge into text tags "{{fieldName}}". These are not fields, but just text tags.

UseWholeParagraphAsRegion

Gets or sets a value indicating whether whole paragraph with TableStart or TableEnd field or particular range between TableStart and TableEnd fields should be included into mail merge region.

public bool UseWholeParagraphAsRegion { get; set; }

Property Value

bool

Remarks

The default value is true.

 English