SmartTagBase.SmartTagType Property (2007 System)

Gets a namespace that acts as a unique identifier for the smart tag.

Namespace:  Microsoft.Office.Tools
Assembly:  Microsoft.Office.Tools.Common.v9.0 (in Microsoft.Office.Tools.Common.v9.0.dll)

Syntax

'Declaration
Public ReadOnly Property SmartTagType As String
'Usage
Dim instance As SmartTagBase 
Dim value As String 

value = instance.SmartTagType
public string SmartTagType { get; }
public:
property String^ SmartTagType {
    String^ get ();
}
public function get SmartTagType () : String

Property Value

Type: System.String
A namespace that acts as a unique identifier for the smart tag.

Remarks

Each smart tag type is defined by a namespace so that its identity is unique. A namespace is an XML construct for uniquely identifying a group of XML tags that belong to a logical category. A namespace groups related properties together for easy property discovery and, more importantly, to keep the property names unique.

Property names are constructed by combining the namespace Uniform Resource Identifier (URI) and the tag name. In other words, property names are composed of a namespace URI and a tag name of the namespace URI.

Similarly, smart tag types are defined by a unique namespace URI plus the tag name. A number sign (#) is appended to the namespace URI and is used to separate the namespace URI from its tag name. The format is as follows: namespaceURI#tagname

An example of a smart tag type is urn:schemas-contoso-com:finance#StockTickerSymbol. Here, the namespace URI is urn:schemas-contoso-com:finance, with StockTickerSymbol as the tag name. They are combined to form a fully qualified name of the property, which in this case is a smart tag type.

A smart tag type is a fully qualified description of an XML tag. Therefore, every smart tag type is uniquely identified by its tag name in addition to its namespace. The URI portion of the property name ensures that it is unique and unambiguous. Two properties with the same tag name can be differentiated using namespaces.

Examples

The following code example demonstrates a handler for the Action.Click event. The event handler uses the SmartTagType property to display the unique namespace identifier of the smart tag. This code example is part of a larger example provided for the Microsoft.Office.Tools.Excel.SmartTag class.

This example is for a document-level customization.

' This action displays smart tag details. 
Private Sub Action2_Click(ByVal sender As Object, _
    ByVal e As ActionEventArgs) Handles Action2.Click

    MsgBox("The current smart tag caption is '" & _
        Me.Caption & "'. The current smart tag type is '" & _
        Me.SmartTagType & "'.")
End Sub
// This action displays smart tag details. 
private void Action2_Click(object sender, ActionEventArgs e)
{
    MessageBox.Show("The current smart tag caption is '" + 
        this.Caption + "'. The current smart tag type is '" + 
        this.SmartTagType + "'.");
}

.NET Framework Security

See Also

Reference

SmartTagBase Class

SmartTagBase Members

Microsoft.Office.Tools Namespace