返回要传递给操作句柄的 XML 示例。String 类型,只读。
expression.XML
expression 必需。该表达式返回“应用于”列表中的对象之一。
本示例向单元格 A1 中添加一个智能标记,然后显示将要传递给操作句柄的 XML。本示例假定主机系统与 Internet 相连。
Sub CheckXML()
    Dim strLink As String
    Dim strType As String
    ' Define SmartTag 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
    Range("A1").Formula = "MSFT"
    ' Display the sample of the XML.
    MsgBox Range("A1").SmartTags.Add(strLink).XML
End Sub