SmartTag Object

SmartTag Object
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

SmartTags
Aa168150.parchild(en-us,office.10).gifSmartTag
Aa168150.space(en-us,office.10).gifAa168150.parchild(en-us,office.10).gif

Represents a string in a document or range that contains recognized type information. The SmartTag object is a member of the SmartTags collection. The SmartTags collection contains all the smart tags in a document or range of text within a document. Microsoft Word uses a recognizer file to label smart tags, and it uses an action file to execute actions related to the smart tags, such as linking to Web sites.

Using the SmartTag object

Use the Item method — or SmartTags(index), where index represents the number of the smart tag — to return a single SmartTag object. This example adds custom properties to the first smart tag in the active document.

  Sub NewSTProp()
    ActiveDocument.SmartTags(Index:=1).Properties _
        .Add Name:="President", Value:=True
End Sub