Skip to main content
You are viewing help content for a version that is no longer maintained/updated.
All docs
V21.2
  • DevExpress v25.1 Update — Your Feedback Matters

    Our What's New in v25.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

    Take the survey Not interested

    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.v21.2.Core.dll

    NuGet Package: DevExpress.Snap.Core

    #Declaration

    public interface SnapMailMergeExportOptions :
        IMailMergeOptions,
        IDataSourceContainerOptions,
        IDataDispatcherOptions,
        ISupportsCopyFrom<SnapMailMergeExportOptions>

    The following members return SnapMailMergeExportOptions objects:

    Library Related API Members
    WinForms Controls MailMergeExportFormShowingEventArgs.Options
    SnapControl.CreateSnapMailMergeExportOptions()
    SnapDocument.CreateSnapMailMergeExportOptions()
    Office File API SnapDocumentServer.CreateSnapMailMergeExportOptions()

    #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