<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.
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 |
|---|
|
Attributes |
Description |
|---|---|
|
Specifies a binary value for the property defined by the parent XML element. A value of A value of <w:… w:val="off"/> The 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>