Export (0) Print
Expand All

FieldMapData class

External Data Source to Merge Field Mapping. When the object is serialized out as xml, its qualified name is w:fieldMapData.

Namespace:  DocumentFormat.OpenXml.Wordprocessing
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 (§17.16.5.35) 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]

Parent Elements

odso (§17.14.25)

Child Elements

Subclause

column (Index of Column Being Mapped)

§17.14.6

dynamicAddress (Use Country-Based Address Field Ordering)

§17.14.13

lid (Merge Field Name Language ID)

§17.14.17

mappedName (Predefined Merge Field Name)

§17.14.23

name (Data Source Name for Column)

§17.14.24

type (Merge Field Mapping)

§17.14.33

[Note: The W3C XML Schema definition of this element’s content model (CT_OdsoFieldMapData) is located in §A.1. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Community Additions

ADD
Show:
© 2014 Microsoft