SmartTags Collection

SmartTags Collection
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.


Aa168151.parchild(en-us,office.10).gifSmartTags
Aa168151.space(en-us,office.10).gifAa168151.parchild(en-us,office.10).gifSmartTag

A collection of SmartTag objects that represents the text in a document that is marked as containing recognized type information. 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 SmartTags collection

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 NewSmartTagProp()
    ActiveDocument.SmartTags(1).Properties _
        .Add Name:="President", Value:=True
End Sub