OdsoRecipientData Class |
Namespace: Aspose.Words.Settings
The OdsoRecipientData type exposes the following members.
| Name | Description | |
|---|---|---|
| OdsoRecipientData | Initializes a new instance of the OdsoRecipientData class |
| Name | Description | |
|---|---|---|
| Active |
Specifies whether the record from the data source shall be imported into a document when the mail merge is performed.
The default value is true.
| |
| Column |
Specifies the column within the data source that contains unique data for the current record.
The default value is 0.
| |
| Hash | ||
| UniqueTag |
Specifies the contents of a given record in the column containing unique data.
The default value is null.
|
| Name | Description | |
|---|---|---|
| Clone |
Returns a deep clone of this object.
| |
| Equals | (Inherited from Object.) | |
| GetHashCode | (Inherited from Object.) | |
| GetType | (Inherited from Object.) | |
| ToString | (Inherited from Object.) |
If a record shall be merged into a merged document, then no information is needed about that record. However, if a given record shall not be merged into a merged document, then the value of the unique key for that record shall be stored in the UniqueTag property of this object to indicate this exclusion.
Document doc = new Document(MyDir + "Odso data.docx"); // Records in this collection that do not have the "Active" flag set to true will be excluded from the mail merge OdsoRecipientDataCollection odsoRecipientDataCollection = doc.MailMergeSettings.Odso.RecipientDatas; Assert.AreEqual(70, odsoRecipientDataCollection.Count); int index = 0; foreach (OdsoRecipientData data in odsoRecipientDataCollection) { Console.WriteLine($"Odso recipient data index #{index++}, will {(data.Active ? "" : "not ")}be imported upon mail merge."); Console.WriteLine($"\tColumn #{data.Column}"); Console.WriteLine($"\tHash code: {data.Hash}"); Console.WriteLine($"\tContents array length: {data.UniqueTag.Length}"); Assert.AreNotEqual(data, data.Clone()); }