全部显示

DownloadURL 属性

       

返回一个 String,它代表与相应的智能标记一起保存的统一资源定位符 (URL)。只读。

expression.DownloadURL

expression   必需。该表达式返回“应用于”列表中的对象之一。

示例

本示例向单元格 A1 中添加“MSFT”,然后显示智能标记的 URL。本示例假定主机系统与 Internet 相连。

Sub UseDownLoadURL()

    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

    Range("A1").Formula = "MSFT"

    ' Display URL for the smart tag.
    MsgBox Range("A1").SmartTags.Add(strLink).DownloadURL

End Sub