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
Applies to | BasicList Object | Discussion Object | DocumentLibrary Object | List Object | ListField Object | ListFieldAttachments Object | ListFieldChoice Object | ListFieldComputed Object | ListFieldCounter Object | ListFieldCurrency Object | ListFieldDateTime Object | ListFieldFile Object | ListFieldInteger Object | ListFieldLookup Object | ListFieldMultiLine Object | ListFieldNumber Object | ListFieldRatingScale Object | ListFields Collection | ListFieldSingleLine Object | ListFieldTrueFalse Object | ListFieldURL Object | Lists Collection | MetaTags Collection | NavigationNode Object | NavigationNodes Collection | PageWindowEx Object | PageWindows Collection | Properties Collection | Survey Object | System Object | Theme Object | Themes Collection | WebEx Object | WebFile Object | WebFiles Collection | WebFolder Object | WebFolders Collection | Webs Collection | WebWindowEx Object | WebWindows Collection