DownloadURL Property

Microsoft Word Visual Basic

expression.DownloadURL

expression    Required. An expression that returns a SmartTag object.

Remarks

The URL address is specified in the related smart tag recognizer file. When a piece of text is recognized and marked, the URL becomes part of the information contained in the smart tag. The DownloadURL property is useful if a document is sent to someone who does not have the necessary recognizer and action files installed on their computer. The user can follow the URL to download the necessary smart tag files.

Example

This example loops through the smart tags in the current document and, if a smart tag has a URL address, lists the address in a new document.

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