IMailMergeDataSource class

IMailMergeDataSource class

Implement this interface to allow mail merge from a custom data source, such as a list of objects. Master-detail data is also supported.

Remarks

When a data source is created, it should be initialized to point to BOF (before the first record). The Aspose.Words mail merge engine will invoke IMailMergeDataSource.move_next() to advance to next record and then invoke IMailMergeDataSource.get_value() for every merge field it encounters in the document or the current mail merge region.

Properties

NameDescription
table_nameReturns the name of the data source.

Methods

NameDescription
get_child_data_source(table_name)The Aspose.Words mail merge engine invokes this method when it encounters a beginning of a nested mail merge region.
get_value(field_name, field_value)Returns a value for the specified field name or False if the field is not found.
move_next()Advances to the next record in the data source.

See Also