OdsoFieldMapDataName Property |
Namespace: Aspose.Words.Settings
Document doc = new Document(MyDir + "Odso data.docx"); // This collection defines how columns from an external data source will be mapped to predefined MERGEFIELD, // ADDRESSBLOCK and GREETINGLINE fields during a mail merge OdsoFieldMapDataCollection fieldMapDataCollection = doc.MailMergeSettings.Odso.FieldMapDatas; Assert.AreEqual(30, fieldMapDataCollection.Count); int index = 0; foreach (OdsoFieldMapData data in fieldMapDataCollection) { Console.WriteLine($"Field map data index #{index++}, type \"{data.Type}\":"); Console.WriteLine( data.Type != OdsoFieldMappingType.Null ? $"\tColumn named {data.Name}, number {data.Column} in the data source mapped to merge field named {data.MappedName}." : "\tNo valid column to field mapping data present."); Assert.AreNotEqual(data, data.Clone()); }