<recipientData> (Reference to Inclusion/Exclusion Data for Data Source)

This element shall specify a reference to the part which contains data about whether the set of records in the associated data source have been explicitly included or excluded from the specified mail merge. Only those records which shall not be used to generate merged WordprocessingML documents must be stored within the referenced part, as all records shall be merged by default as part of the mail merge operation. [: Applications may choose to store only those records which are excluded for efficiency, or a list of all records in order to determine which set of records were added/removed between mail merge operations. ]

[: When defining a mail merge, it is possible that a user wishes to connect to a specified data source, but specify only a subset of the records returned by the query specified by the <query> element (§2.14.26) which shall be merged as part of the mail merge operation. This element allows applications to utilize a separate part to store this information, either the shared part defined by this Office Open XML Standard, or an application-specific part as needed. ]

If the relationship type of the relationship specified by this element is not http://schemas.openxmlformats.org/officeDocument/2006/mailMergeRecipientData, is not present, or does not have a @TargetMode attribute value of Internal, then the document shall be considered non-conformant. If an application cannot process external content of the content type specified by the targeted part, then it may be ignored.

This Office Open XML Standard defines one shared mechanism for storing this data: using the Mail Merge Recipient Data part. This mechanism shall be used if the associated data source has a column which may be used as the unique key. However, when using data sources which do not have a unique key, applications may store their own part (of an application-defined content type) using this relationship.

<w:settings><w:mailMerge><w:odso><w:recipientData r:id="recipient1" />

The <recipientData> element specifies that the external content targeted by the relationship with an ID of recipient1 contains the recipient inclusion/exclusion data for the mail merge operation. Examining the contents of the corresponding relationship part item, we can see the targets for that relationship:

<Relationships  ><Relationship Id="recipient1" TargetMode="Internal" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/mailMergeRecipientData" Target="recipientData.xml" /></Relationships>

The corresponding relationship part item shows that the file containing this data is located next to the main document and is named recipientData.xml. ]

Parent Elements




<id> (Relationship to Part)

Namespace: .../officeDocument/2006/relationships

Specifies the relationship ID to a specified part.

The specified relationship shall match the type required by the parent element:

  • http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer for the <footerReference> element

  • http://schemas.openxmlformats.org/officeDocument/2006/relationships/header for the <headerReference> element

  • http://schemas.openxmlformats.org/officeDocument/2006/relationships/font for the <embedBold>, <embedBoldItalic>, <embedItalic>, or< embedRegular> elements

  • http://schemas.openxmlformats.org/officeDocument/2006/relationships/printerSettings for the <printerSettings> element

<… r:id="rId10" />

The markup specifies the associated relationship part with relationship ID rId1 contains the corresponding relationship information for the parent XML element. ]

The possible values for this attribute are defined by the ST_RelationshipId simple type (§

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_Rel">
	<attribute ref="r:id" use="required"/>