<viewMergedData> (View Merged Data Within Document)

This element specifies that a specific merged document shall display the data from the specified external data source where merge fields have been inserted. The <activeRecord> element (§2.14.2) is used to specify which record within the external data source is to have its applicable data displayed where applicable within the WordprocessingML merged document.

If the <activeRecord> element is not present in the WordprocessingML for the document with the <viewMergedData'>s @val attribute equal to on, the hosting application may behave as if the <acitveRecord> element's @val attribute was equal to 1. This element is ignored if the <viewMergedData>2.14.36) element is not present or present with a @val attribute equal to Off, 0, or false.

example:

This table below illustrates the necessary WordprocessingML to display applicable data from the specified external data source within the merged document where fields have been inserted:

<w:viewMergedData val="off"/>

<w:viewMergedData val="on" />

<w:activeRecord w:val="1" />

<w:viewMergedData val="off" />

<w:activeRecord w:val="1" />

Dear {MERGEFIELD "Courtesy Title" \m} {MERGEFIELD "Last Name" \m},

Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text.

Sincerely,

Dear Mr. Doe:

Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text.

Sincerely,

Dear {MERGEFIELD "Courtesy Title" \m} {MERGEFIELD "Last Name" \m},

Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text. Sample letter text.

Sincerely,

The <viewMergedData> element specifies that the specified record in the external data source shall be displayed in place of merge fields in the current document. ]

Parent Elements

<mailMerge>2.14.20)

Attributes

Description

<val> (On/Off Value)

Specifies a binary value for the property defined by the parent XML element.

A value of on, 1, or true specifies that the property shall be explicitly applied. This is the default value for this attribute, and is implied when the parent element is present, but this attribute is omitted.

A value of off, 0, or false specifies that the property shall be explicitly turned off.

<w:… w:val="off"/>

The @val attribute explicitly declares that the property is turned off. ]

The possible values for this attribute are defined by the ST_OnOff simple type (§2.18.67).

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

<complexType name="CT_OnOff">
	<attribute name="val" type="ST_OnOff"/>
</complexType>