Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets a SmartTags object that represents a smart tag in a document. 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.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)
Syntax
'Declaration
Public ReadOnly Property SmartTags As SmartTags
public SmartTags SmartTags { get; }
Property Value
Type: SmartTags
A SmartTags object that represents a smart tag in a document.
Examples
The following code example adds properties to the first smart tag in the document. This example assumes that a smart tag exists in the document. To use this example, run it from the ThisDocument class in a document-level project.
Private Sub DocumentSmartTags()
    Dim index As Object = 1
    If Me.SmartTags.Count >= 1 Then 
        Me.SmartTags.Item(index).Properties.Add("President", "true")
    End If 
End Sub
private void DocumentSmartTags()
{
    object index = 1;
    if (this.SmartTags.Count >= 1)
    {
        this.SmartTags.get_Item(ref index)
            .Properties.Add("President", "true");
    }
}
.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.