MakeAbs Method

Microsoft FrontPage Visual Basic

Returns a String that represents an absolute URL for the String specified in the URL parameter, using the URLBase parameter as the starting point. If the URL is already absolute, the URL is returned unchanged. For more information about absolute and relative URLs, refer to Understanding Absolute and Relative URL Addressing.

expression.MakeAbs(UrlBase, Url)

expression    An expression that returns a Application object.

UrlBase    Required Variant. A base URL. Can be a string or a WebEx, WebFolder, WebFile, NavigationNode, or IHTMLDocument2 object.

Url    Required String. A string that contains the entire URL for the Web site. This can be any URL for a Web site, such as "http://web server/folder" or "file://file system/folder" for disk-based Web sites.

Example

This example changes a relative URL to an absolute URL.

Note  To run this example, you must have a Web site and a file called "C:\My Documents\My Web Sites\Rogue Cellars\Zinfandel.htm." Or, you may substitute an alternative Web site URL or file name.

Private Sub MakeURLAbsolute()
    Dim myBaseURL As WebEx
    Dim myAbsAddress As String
    Dim myLocalUrl As String

    myBaseURL = Webs.Open("C:\My Web Sites")
    myLocalUrl = "Zinfandel.htm"

    myAbsAddress = MakeAbs(myBaseURL, myLocalUrl)
End Sub