# TagName Element

When the TagName element is contained in an Act element, it contains the name of the smart tag that the action is associated with.

When the TagName element is contained in a SmartTagDef element, it contains the name of the smart tag that is used as a key to associate the smart tag with its actions.

## Syntax

    <TagName>
        [Unit]
        [F]
        [Err]
        [V]>
    </TagName>

## Attributes

Unit

Optional string. Represents a unit of measure. The default is STR. For details about STR, see Units of measure.

F

Optional string. Represents the element's formula. This attribute can contain one of the following strings: "someFormula" if the formula exists locally, "No Formula" if the formula is locally deleted or blocked, or "Inh" if the formula is inherited.

If the attribute is not present, the element's formula is a simple constant. For example, <element>5</element>.

Err

Optional string. Indicates that the formula evaluates to an error. The value of Err is the current value (an error message string); the value of the element is the last valid value.

V

Optional string. Represents the null string condition for a string cell value. In some cases it is helpful to distinguish between an empty string cell null and a null string cell value. This attribute is used to distinguish between these forms of an empty value.

## Element properties

Property | Value
--- | ---
Name | TagName
Minimum Occurrences | 0
Maximum Occurrences | 1

## Element information

Parent elements

Act

SmartTagDef

Child elements

None

## Remarks

The TagName element in the SmartTagDef element works together with the TagName element in the Act element to associate a smart tag with its actions. The TagName element in the Act element that has the same value as that in the SmartTagDef element defines actions for that smart tag.

- If the TagName element in an Act element is blank, the action appears on a shortcut menu, and not on a smart tag menu.
- If a TagName element value in the Act element matches the TagName element value in a SmartTagDef element, the action appears on the smart tag menu.
- If an action's TagName element has a value but it does not match the TagName value in any shape tag element, that action does not appear on any smart tag menus nor shortcut menus.
- If several smart tag elements have the same TagName value, they will all show the same actions.

The TagName element is relevant only when contained in a Shape or PageSheet element. It is ignored when contained in a DocumentSheet or StyleSheet element.

## See also

TagName cell (Actions section)

TagName cell (Smart Tags section)

©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