SnapMailMergeExportOptions Interface

Maintains the options that determine how a document is rendered when finishing a mail-merge report.

Namespace: DevExpress.Snap.Core.Options

Assembly: DevExpress.Snap.v20.1.Core.dll

Declaration

public interface SnapMailMergeExportOptions :
    IMailMergeOptions,
    IDataSourceContainerOptions,
    IDataDispatcherOptions,
    ISupportsCopyFrom<SnapMailMergeExportOptions>
Public Interface SnapMailMergeExportOptions
    Inherits IMailMergeOptions,
             IDataSourceContainerOptions,
             IDataDispatcherOptions,
             ISupportsCopyFrom(Of SnapMailMergeExportOptions)

Remarks

The SnapMailMergeExportOptions options are not stored in the document template. These options relate to the control (not to a document) and are used when several merged documents should be created with the same settings. Note that a snap template stores SnapMailMergeVisualOptions options (accessible with the SnapControl.Options.SnapMailMergeVisualOptions notation). These options affect the document display and should be restored on template loading.

You can specify mail merge options when calling the SnapControl.SnapMailMerge method in code. If the application does not call this method but the mail merge is initiated by the end-user clicking Finish & Merge on the Data Tools: Mail Merge toolbar, the SnapControl.MailMergeExportFormShowing event occurs and you can set the options with the MailMergeExportFormShowingEventArgs.Options property.

NOTE

Check the SnapMailMergeExportOptions.DataSourceName property of your global options before calling the SnapControl.SnapMailMerge method. If the data source name returns null, assign the data source name to this property.

IMPORTANT

After assigning the SnapMailMergeExportOptions.DataSourceName property and before calling the SnapControl.SnapMailMerge method, do not modify the data source collection accessible using the SnapControl.DataSources, SnapDocument.DataSources or DocumentDataSources.DataSources properties.

Two CreateSnapMailMergeExportOptions methods are provided - the SnapDocument.CreateSnapMailMergeExportOptions for the document and the SnapControl.CreateSnapMailMergeExportOptions method for the control. There is no difference between these methods as they are provided for convenience.

The following image illustrates the Export Range default dialog where the mail merge export options are specified.

snap-mail-merge-export-range-dialog

See Also