Microsoft Office Tutorials and References
In Depth Information
22.4 SmartTagAction Object
Do not confuse the name of the smart tag with the text, such as IBM, of the smart tag. There does
not appear to be a smart tag member that returns the smart tag's text.
The DownloadURL property is an optional URL that is specified by the smart tag's creator. It
provides an address where additional smart tag actions may be available for download.
According to the Microsoft documentation, the read-only XML property of the smart tag object
"Returns a String representing a sample of the XML that would be passed to the action handler."
The term "sample" could certainly use clarification. In any case, for the smart tag in Figure 22-2 ,
the code:
Debug.Print st.XML
produces the string:
<xml xmlns:fa1="urn:schemas-microsoft-
which contains the smart tag's fully qualified name as well as the tag's text (IBM).
22.4 SmartTagAction Object
The SmartTagActions property returns the SmartTagActions collection of SmartTagAction
objects. A SmartTagAction object represents an action that can be taken for a smart tag. As an
example, referring to Figure 22-2 , the code:
Dim st As SmartTag
Set st = Application.Range("A1").SmartTags(1)
For i = 1 To st.SmartTagActions.Count
Debug.Print st.SmartTagActions(i).Name
produces the output:
Insert refreshable stock price...
which corresponds to the four actions in Figure 22-2 . Incidentally, the code:
Dim st As SmartTag
Dim sta As SmartTagAction
For Each sta In st.SmartTagActions
Debug.Print sta.Name
does not print anything, nor does it produce an error message!
The SmartTagAction object has an Execute method that executes an action. Here is an example
that executes the first action in Figure 22-2 :
Search JabSto ::

Custom Search