ExitMacro Class

Script Function to Execute on Form Field Exit.When the object is serialized out as xml, its qualified name is w:exitMacro.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.MacroNameType
        DocumentFormat.OpenXml.Wordprocessing.ExitMacro

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Class ExitMacro _
    Inherits MacroNameType
'Usage
Dim instance As ExitMacro
public class ExitMacro : MacroNameType

Remarks

[ISO/IEC 29500-1 1st Edition]

17.16.11 exitMacro (Script Function to Execute on Form Field Exit)

This element specifies a subroutine in a scripting language which should be executed when the when the run contents of the parent form field are exited. The language and location of this subroutine can be determined using any method desired by an application. [Note: It is at the discretion of an application to determine the scope and timing of "exiting" a form field, for example, when the user moves the insertion point in a user interface or upon each operation by an application without a user interface, etc. end note]

If this element is omitted, then no subroutine shall be associated with exiting the run contents of the parent form field. If this element specifies a macro which cannot be located or is not supported by an application, then its value can be ignored, but shall not be lost upon resaving the file.

[Example: Consider the following WordprocessingML fragment for the properties of a form field:

<w:ffData>
<w:exitMacro w:val="TestExitFunction" />
</w:ffData>

The exitMacro element specifies that any application which processes this file should attempt to locate and execute a scripting subroutine called TestExitFunction when the contents of the form field are exited. If this subroutine cannot be located or executed, then this setting is silently ignored. end example]

Parent Elements

ffData (§17.16.17)

Attributes

Description

val (Name of Script Function)

Specifies the name of a single scripting subroutine which shall be associated with the parent element. Its use is specifies based on the context of the parent XML element.

[Example: Consider the following WordprocessingML fragment for the properties of a form field:

<w:ffData>
<w:exitMacro w:val="HelloWorld" />
</w:ffData>

The val attribute specifies that a script function called HelloWorld must be used in the context of the parent element; in this case, to execute when the field is exited. end example]

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

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

© ISO/IEC29500: 2008.

Thread Safety

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

See Also

Reference

ExitMacro Members

DocumentFormat.OpenXml.Wordprocessing Namespace