Microsoft Office Tutorials and References
In Depth Information
22.2 SmartTagRecognizer Object
Thus, smart tags are tools that recognize certain types of data within an Office document and
present the user with a list of predefined actions. (At the user-interface level, the smart tag options
dialog can be reached through the AutoCorrect Options menu item under the Tools menu.)
22.2 SmartTagRecognizer Object
The object that is responsible for recognizing a particular type of data as a smart tag is called a
smart tag recognizer . These recognizers take the form of code in a Dynamic Link Library (DLL)
that is loaded into Excel's address space when Excel is first loaded. To illustrate, on my system,
the following code:
Dim str As SmartTagRecognizer
For Each str In Application.SmartTagRecognizers
Debug.Print str.progID & "/" & str.Enabled
Next
produces the output:
FName.SmartTag/True
MOFL.SmartTag/True
indicating that two smart tag recognizer DLLs are loaded in Excel's address space. (A single DLL
may be used to recognize more than one type of smart tag.) We also see from this code that the
SmartTagRecognizers collection holds a SmartTagRecognizer object for each of the currently
available smart tag recognizers.
The SmartTagRecognizer object has a read-write Enabled property used to enable or disable the
recognizer, as well as read-only properties called progID and FullName, which return the name of
the recognizer (the FullName property includes the path).
22.3 SmartTag Object
The Range object has a SmartTags property that returns the collection of all SmartTag objects. Of
course, a SmartTag object represents a smart tag. Let us discuss the more important members of
the SmartTag object, listed next. (The Delete method is self-explanatory.)
Delete method
Name property
DownloadURL property
XML property
SmartTagActions property
The Name property of the SmartTag object returns a fully qualified name for the smart tag. A fully
qualified name consists of a XML namespace URI followed by a number sign (#) and then the tag
name. For instance, referring to the smart tag in Figure 22-2 , the code:
Debug.Print st.Name
prints:
 
 
Search JabSto ::




Custom Search