DownloadURL 属性

       

返回一个 String 类型的数值,表示智能标签的 URL 地址。只读。

expression.DownloadURL

expression   必需。该表达式返回一个 SmartTag 对象。

说明

相关的智能标签识别文件中指定了 URL 地址。如果识别并标记一条文本,URL 即成为智能标签中包含的部分信息。如果将文档发送给那些在其计算机中没有安装必要的识别和操作文件的用户,DownloadURL 属性就很有用,用户可依据 URL 下载所需的智能标签文件。

示例

本示例循环查看活动文档中的智能标签,如果其中包含 URL 地址,则在新文档中列出地址。

Sub SmartTagDownloadURL()
    Dim docNew As Document
    Dim stgTag As SmartTag
    Dim intCount As Integer

    Set docNew = Documents.Add

    docNew.Content.InsertAfter "Smart Tag URLs"
    docNew.Content.InsertParagraphAfter

    For Each stgTag In ThisDocument.SmartTags
        intCount = intCount + 1
        If ThisDocument.SmartTags(intCount).DownloadURL <> "" Then
            docNew.Content.InsertAfter ThisDocument _
                .SmartTags(intCount).DownloadURL
            docNew.Content.InsertParagraphAfter
        End If
    Next

End Sub