Share via


XMLNode.SmartTag Property

Gets a SmartTag object that represents the smart tag associated with the XMLNode control.

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

Syntax

'Declaration
ReadOnly Property SmartTag As SmartTag
SmartTag SmartTag { get; }

Property Value

Type: Microsoft.Office.Interop.Word.SmartTag
A SmartTag that represents the smart tag associated with the XMLNode control.

Remarks

XML elements can have smart tag actions assigned to them through external components that implement the ISmartTag interface.

Important

Smart tags are deprecated in Excel 2010 and Word 2010. You can still use the related APIs, but there is no smart tag functionality after Excel 2007 and Word 2007.

Examples

The following code example uses the SmartTag property to reload the action of a smart tag associated with an XMLNode. This example assumes that the current document contains an XMLNode named CustomerNode.

Private Sub ReloadSmartTag()
    Try
        Me.CustomerNode.SmartTag.SmartTagActions.ReloadActions()
    Catch ex As Exception
        MsgBox(ex.Message)
    End Try
End Sub
private void ReloadSmartTag()
{
    try 
    {
        this.CustomerNode.SmartTag.SmartTagActions.ReloadActions();
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.Message);
    }
}

.NET Framework Security

See Also

Reference

XMLNode Interface

Microsoft.Office.Tools.Word Namespace