Microsoft Office Tutorials and References
In Depth Information
22.5 SmartTagOptions Object
Sub ExecuteASmartTag()
Dim st As SmartTag
Dim sAction As String
Dim ws As Worksheet
Set ws = Application.ActiveSheet
sAction = "Insert refreshable stock price..."
' Invoke a smart tag for the Microsoft ticker symbol.
Set st = ws.Range("A1").SmartTags( _
"urn:schemas-microsoft-com:office:smarttags#stockticker")
st.SmartTagActions(sAction).Execute
End Sub
22.5 SmartTagOptions Object
The SmartTagOptions object, returned by the SmartTagOptions property of the Workbook object,
has two useful properties. The DisplaySmartTags property takes a value from the following enum:
Enum XlSmartTagDisplayMode
xlIndicatorAndButton = 0
xlDisplayNone = 1
xlButtonOnly = 2
End Enum
Thus, we can choose to display nothing, a button only, or a button and indicator for each smart tag.
The EmbedSmartTags property is a Boolean property that determines whether or not smart tags
are saved along with the workbook (although the term "embed" seems to be a rather poor choice
of terminology).
For more information on smart tags and how to create custom smart tags (which as we mentioned
earlier cannot be done from within Excel XP itself), you can check out the smart tag SDK on
Microsoft's web site at:
http://msdn.microsoft.com/downloads/default.asp?URL=/code/sample.asp?url=/MSDN-
FILES/027/001/652/msdncompositedoc.xml .
 
Search JabSto ::




Custom Search