External Data Source to Merge Field Mapping. When the object is serialized out as xml, its qualified name is w:fieldMapData.
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
[ChildElementInfoAttribute(typeof(ColumnIndex))] [ChildElementInfoAttribute(typeof(MappedName))] [ChildElementInfoAttribute(typeof(Name))] [ChildElementInfoAttribute(typeof(MailMergeFieldType))] [ChildElementInfoAttribute(typeof(LanguageId))] [ChildElementInfoAttribute(typeof(DynamicAddress))] public class FieldMapData : OpenXmlCompositeElement
[ISO/IEC 29500-1 1st Edition]
fieldMapData (External Data Source to Merge Field Mapping)
This element specifies how a column specified in the external data source that has been connected to a WordprocessingML document shall be mapped to the pre-defined MERGEFIELD fields (§188.8.131.52) within the given merged document's contents. Each instance of a fieldMapData element contains the information needed to map one column in the external data source to a single type of pre-defined MERGEFIELD field for the purposes of the mail merge in the current document.
[Example: Consider a single merged document. The WordprocessingML below demonstrates the mapping of the Country column from the external data source to the predefined WordprocessingML Country or Region merge field when the merged document is populated with external data as part of a mail merge:
<w:odso> … <w:fieldMapData> <w:type w:val="dbColumn" /> <w:name w:val="Country" /> <w:mappedName w:val="Country or Region" /> <w:column w:val="9" /> … </w:fieldMapData> </w:odso>
The fieldMapData element specifies the mapping between the external data source and a single merge field as follows: the child elements specify that the tenth column in the data source, last titled Country in the specified external data source when the connection was last made is to be mapped to the predefined WordprocessingML merge field calling for Country or Region data.
With the fieldMapData element configured as such, an application can be used in conjunction with this WordprocessingML document to populate the document with data mapped from the specified external data source to fields within the merged document. end example]
column (Index of Column Being Mapped)
dynamicAddress (Use Country-Based Address Field Ordering)
lid (Merge Field Name Language ID)
mappedName (Predefined Merge Field Name)
name (Data Source Name for Column)
type (Merge Field Mapping)
[Note: The W3C XML Schema definition of this element’s content model (CT_OdsoFieldMapData) is located in §A.1. end note]
© ISO/IEC29500: 2008.