Returns or sets a String that represents an FpURLComponent of the given URL. The FpURLComponent corresponds to a portion of the URL that signifies the location of the file.
expression.ParseURL(Url, URLComponent)
expression Required. An expression that returns an Application object.
Url Required String. The URL to be parsed.
URLComponent Required FpURLComponent. The component of the URL to be returned by the method.
FpURLComponent can be one of these FpURLComponent constants. |
fpURLComponentBookmark |
fpURLComponentFileExtension |
fpURLComponentFileName |
fpURLComponentPassword |
fpURLComponentPath |
fpURLComponentPort |
fpURLComponentQuery |
fpURLComponentScheme |
fpURLComponentServer |
fpURLComponentUserName |
The following example retrieves the file name from the URL, using the fpURLComponentFileName argument, and displays it to the user.
Sub FrontPageParseURL()
'Parses the URL into its components
Dim objApp As FrontPage.Application
Dim strURL As String
Set objApp = FrontPage.Application
'Parse the URL and retrieve the filename component
strURL = objApp.ParseURL("file:///D:/Documents and Settings/UserName/My Documents/My Webs/Index.htm", _
fpURLComponentFileName)
'Display the message to the user.
MsgBox "The filename is " & strURL & "."
End Sub