Url Property

Microsoft FrontPage Visual Basic

Returns the URL for the specified object. Read-only String.

expression.Url

expression    Required. An expression that returns one of the objects in the Applies to list.

Remarks

URLs can be absolute or relative. An absolute URL contains the exact path to the specified object while a relative URL may contain characters such as "../..", "?", or ";" depending on the URL access scheme used to parse the relative URL. The Microsoft FrontPage object model always uses absolute URLs. For more information on URLs, see Understanding Absolute and Relative URLs in FrontPage.

Example

The following example returns the URL of the first file in the root folder of the active Web site.

Private Sub GetFileUrl()
    Dim myFile As WebFile
    Dim myURL As String

    Set myFile = ActiveWeb.RootFolder.Files(0)
    myURL = myFile.Url

End Sub