返回一个 CustomProperties 对象,该对象代表智能标记的属性。
expression.Properties
expression 必需。该表达式返回“应用于”列表中的对象之一。
可用具有 Properties 属性的 Add 方法存储智能标记的附加元数据。
本示例向单元格 A1 中添加一个智能标记,接着向智能标记添加具有“Nasdaq”值的名为“Market”的附加元数据,然后将属性的值返回给用户。本示例假定主机系统与 Internet 相连。
Sub UseProperties()
Dim strLink As String
Dim strType As String
' Define smart tag variables.
strLink = "urn:schemas-microsoft-com:smarttags#StockTickerSymbol"
strType = "stockview"
' Enable smart tags to be embedded and recognized.
ActiveWorkbook.SmartTagOptions.EmbedSmartTags = True
Application.SmartTagRecognizers.Recognize = True
' Add a property for MSFT smart tag and define it's value.
Range("A1").SmartTags.Add(strLink).Properties.Add _
Name:="Market", Value:="Nasdaq"
' Notify the user of the smart tag's value.
MsgBox Range("A1").SmartTags.Add(strLink).Properties("Market").Value
End Sub