com.aspose.words
Interface IMailMergeDataSourceRoot


public interface IMailMergeDataSourceRoot 

Implement this interface to allow mail merge from a custom data source with master-detail data.

Method Summary
abstract IMailMergeDataSourcegetDataSource(java.lang.String tableName)
           The Aspose.Words mail merge engine invokes this method when it encounters a beginning of a top-level mail merge region.
 

Method Detail

getDataSource

public abstract IMailMergeDataSource getDataSource(java.lang.String tableName)
                                                throws java.lang.Exception
The Aspose.Words mail merge engine invokes this method when it encounters a beginning of a top-level mail merge region.

When the Aspose.Words mail merge engines populates a document with data and encounters MERGEFIELD TableStart:TableName, it invokes getDataSource(java.lang.String) on this object. Your implementation needs to return a new data source object. Aspose.Words will use the returned data source to populate the mail merge region.

If a data source (table) with the specified name does not exist, your implementation should return null.

Parameters:
tableName - The name of the mail merge region as specified in the template document. Case-insensitive.
Returns:
A data source object that will provide access to the data records of the specified table.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.