[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

calcOnExit (Recalculate Fields When Current Field Is Modified)

This element specifies that the current contents of all fields within the current WordprocessingML document shall be recalculated from their field codes when the contents of the parent form field are modified. [Note: It is at the discretion of an application to determine the scope of a single modification, for example, when the user moves the insertion point in a user interface, or after each keystroke, etc. end note]

If this element is omitted, then modification of the contents of the current field shall not result in all fields in the current document being recalculated.

[Example: Consider the following WordprocessingML fragment for the contents of two fields in a document:

<w:bookmarkStart w:name="Text1" … />
<w:fldSimple w:instr="FORMFIELDTEXT">
<w:ffData>
<w:calcOnExit/>

</w:ffData>
<w:r>
<w:t>1</w:t>
</w:r>
</w:fldSimple>
<w:bookmarkEnd w:name="Text1" … />
<w:fldSimple w:instr="=Text1+10">
<w:r>
<w:t>11</w:t>
</w:r>
</w:fldSimple>

The first field above (the text form field) has a current value of 1, but also has the calcOnExit element present (therefore inheriting its default attribute value of true). This means that if the value of this form field is changed to 10, that all fields in the document shall automatically be updated, resulting in the second field's value being automatically changed to 20. end example]

Parent Elements

ffData2.16.17)

 

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.

 

[Example: For example, consider the following on/off property:

 

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

 

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

 

The possible values for this attribute are defined by the ST_OnOff simple type2.18.67).

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

<complexType name="CT_OnOff">

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

</complexType>