Back to Devexpress

RichEditControl.CreateMailMergeOptions() Method

windowsforms-devexpress-dot-xtrarichedit-dot-richeditcontrol-c1fb1d52.md

latest3.4 KB
Original Source

RichEditControl.CreateMailMergeOptions() Method

Creates an object for specifying the options used in mail merge operations.

Namespace : DevExpress.XtraRichEdit

Assembly : DevExpress.XtraRichEdit.v25.2.dll

NuGet Package : DevExpress.Win.RichEdit

Declaration

csharp
public MailMergeOptions CreateMailMergeOptions()
vb
Public Function CreateMailMergeOptions As MailMergeOptions

Returns

TypeDescription
MailMergeOptions

A MailMergeOptions class instance containing options used for mail merge.

|

Remarks

Default options used in mail merge operations are specified via the RichEditControl.Options.MailMerge property. If options should be modified for particular merges only, you can create a MailMergeOptions object using the CreateMailMergeOptions method, change options as required, and perform a merge using the RichEditControl.MailMerge method, which gets the MailMergeOptions as the parameter.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the CreateMailMergeOptions() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-richedit-create-a-master-detail-report/CS/RichEditMasterDetailMailMerge/Form1.cs#L88

csharp
//Set additional mail merge options if necessary:
MailMergeOptions options = masterRichEdit.CreateMailMergeOptions();
options.LastRecordIndex = 4;

winforms-richedit-create-a-master-detail-report/VB/RichEditMasterDetailMailMerge/Form1.vb#L82

vb
'Set additional mail merge options if necessary:
Dim options As MailMergeOptions = masterRichEdit.CreateMailMergeOptions()
options.LastRecordIndex = 4

See Also

MailMerge

MailMerge

RichEditControl Class

RichEditControl Members

DevExpress.XtraRichEdit Namespace