location 属性

       

返回 FPHTMLLocation 对象,该对象代表当前文档的位置信息。FPHTMLocation 对象包含关于文档位置的信息,例如文档的路径、端口和协议。

expression.location

expression  必选。返回“应用于”列表中的对象之一的表达式。

示例

下列示例返回位置对象,并显示文档的路径。

Sub ReturnLocation()
'Returns the location information of the current document.

    Dim objApp As FrontPage.Application
    Dim objLocation As FPHTMLLocation
    Set objApp = FrontPage.Application
    Set objLocation = objApp.ActiveDocument.location
    'Display location information to user.
    MsgBox "The path of the current document is: " & objLocation.pathname

End Sub