action Attribute

Specifies an action of an editing component, using the syntax "NameOfEditingComponent::NameOfAction".

Type

xsd:NMTOKEN

Remarks

The action attribute is an optional attribute of the button element, but is required for buttons used with editing components.

The following are the editing actions that may be used as the value of the action attribute.

NameDescription
xCollection::insertInserts an item.
xCollection::insertBeforeInserts an item before the current selection.
xCollection::insertAfterInserts an item after the current selection.
xCollection::removeRemoves an item.
xCollection::removeAllRemoves all items.
xOptional::insertInserts an optional item.
xOptional::removeRemoves an optional item.
xReplace::replaceReplaces an existing item.
xFileAttachment::attachOpens a dialog box to browse for files to attach to a form.
xFileAttachment::openOpens a file attached to a form.
xFileAttachment::saveAsOpens the a dialog box to browse for a location where a file is to be saved.
xFileAttachment::removeRemoves the file from the form.

Example

The following is an example of the action attribute as it is used in the button element:

<xsf:menuArea name="msoInsertMenu">
   <xsf:menu caption="&amp;Section">
      <xsf:button action="xCollection::insert" xmlToEdit="CD_10"
         caption="CD" showIf="always"></xsf:button>
      <xsf:button action="xCollection::insert" xmlToEdit="Track_14" 
         caption="Track" showIf="always"></xsf:button>
      <xsf:button action="xOptional::insert" xmlToEdit="Label_16" 
         caption="Label"></xsf:button>
   </xsf:menu>
</xsf:menuArea>
©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp