다음을 통해 공유


SmartTagBase.SmartTagType Property

Gets a namespace that acts as a unique identifier for the smart tag. This type or member is intended to be used only in projects for the 2007 Microsoft Office system. Smart tags are deprecated in Office 2010. .

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

Syntax

'Declaration
ReadOnly Property SmartTagType As String
string SmartTagType { get; }

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 Microsoft.Office.Tools.Excel.SmartTag.

' This action displays smart tag details. 
Private Sub Action2_Click(ByVal sender As Object,
    ByVal e As Microsoft.Office.Tools.Excel.ActionEventArgs) Handles Action2.Click
    MessageBox.Show("The current smart tag caption is '" &
    smartTagDemo.Caption & "'. The current smart tag type is '" &
    smartTagDemo.SmartTagType & "'.")
End Sub
// This action displays smart tag details. 
private void Action2_Click(object sender,
    Microsoft.Office.Tools.Excel.ActionEventArgs e)
{
    MessageBox.Show("The current smart tag caption is '" +
        smartTagDemo.Caption + "'. The current smart tag type is '" +
        smartTagDemo.SmartTagType + "'.");
}

.NET Framework Security

See Also

Reference

SmartTagBase Interface

Microsoft.Office.Tools Namespace