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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.