Parent Property

Microsoft FrontPage Visual Basic

Parent Property

Returns an Object that represents the Parent object for the specified object.

expression.Parent

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

Remarks

Specifying the Parent property of a WebFile object returns the WebFolder object. When an object is contained in a Web site, the Parent property returns the WebEx object. For example, if the Theme object is contained in a WebEx object called "Adventure Works Web", the Parent property returns "Adventure Works Web"; otherwise, for a theme referenced outside of a WebEx object, the Parent property returns the name of the Application object— in this case, "Microsoft FrontPage". However, when the System object is specified from a client computer, the Parent property returns the Application object of the host, not the client.

The following table describes the values returned for the different object types.

Object Description
MetaTags Returns the WebFile object for the META tags.
NavigationNode Returns the parent NavigationNode object, except in the case of the RootNavigationNode object, whose parent is the WebEx object.
NavigationNodes Returns the parent NavigationNode object for the collection of navigation nodes based on the navigation structure.
PageWindowEx Returns the WebWindowEx or Application object in which the page resides.
PageWindows Returns the Application object that contains the collection.
Properties Returns the WebEx, WebFile, or WebFolder object from the META tag information.
System Returns the Application object.
Theme Returns the parent WebEx or WebFile object for the theme.
Themes Returns the WebEx object that contains the collection.
WebEx Returns the Application object.
WebFile Returns the WebFolder object.
WebFiles Returns the parent WebFolder object.
WebFolder Returns either the parent WebFolder object (if it's a subfolder) or the WebEx object for the root folder.
WebFolders Returns the WebFolder object that contains the collection.
Webs Returns the Application object.
WebWindowEx Returns the Application object that contains the specified object.
WebWindows Returns the Application object that contains the collection.

Example

In the following example, myParent returns the file type and build of the parent application for the active Web site.

    Private Sub GetParentInfo()
    Dim myWeb As WebEx
    Dim myParent As String
    Dim myParentBuild As String

    Set myWeb = Application.ActiveWeb

    With myWeb
        myParent = .Parent.FileSearch.FileType
        myParentBuild = .Parent.Build
    End With
End Sub