Nevron Open Vision Documentation
Rich Text Editor / Mail Merge / Mail Merge Fields
In This Topic
    Mail Merge Fields
    In This Topic

    Nevron Text Editor supports the following types of mail merge fields:

     Source Fields

    Source mail merge fields are field inlines that point directly to a column in the data source. When populating the mail merge fields with values from a data record, these fields obtain their values directly from the corresponding column of the data source. To create a mail merge source field simply create a mail merge source field value and pass it to the field inline constructor:

    Create Mail Merge Source Field
    Copy Code
    NMailMergeSourceFieldValue value = new NMailMergeSourceFieldValue("City");
    NFieldInline fieldInline = new NFieldInline(value);
    
     Predefined Fields

    Predefined mail merge fields are special fields that can be used directly in a text document just like source fields or in complex mail merge fields like the greeting line. To create a mail merge predefined field, create a mail merge predefined field value and pass it to the field inline constructor:

    Create Mail Merge Predefined Field
    Copy Code
    NMailMergePredefinedFieldValue value = new NMailMergePredefinedFieldValue(ENMailMergeDataField.City);
    NFieldInline fieldInline = new NFieldInline(value);
    

    For predefined fields to work, they should be mapped to data source columns. The field mappings are controlled through the FieldMap property of the mail merge data source.

     Composite Fields

    Composite mail merge fields are fields that use data from several predefined field values. An example of a composite mail merge field is the greeting line field. It lets you specify a greeting message usually used as a first line in a conversation. The following properties of the NGreetingLineFieldValue can be used to control the structure and the content of the greeting message:

    • Before - the text to display before the greeting line content.
    • ContentType - defines the content of the greeting line field value.
    • After - the text to display after the greeting line content.
     Counter Fields

    Counter mail merge fields can be used to show the ordinal number of the current data record. Nevron Text Editor provides the following counter field values:

    • NMailMergeRecordSourceIndexFieldValue - displays the ordinal position of the mail merge data record in the list of selected records from the data source.
    • NMailMergeRecordMergeIndexFieldValue - displays the ordinal position of the record in the mail merge. This number is not visible until the mail merge is finished.
    See Also