Export (0) Print
Expand All

Parent Property

Office 2003

Returns the parent Object of the specified object. Read-only.

expression.Parent

expression    Required. An expression that returns a Microsoft Outlook object.

Example

This Visual Basic for Applications (VBA) example displays the folders in the parent folder of Inbox.

Sub GetRootFolder()
    Dim mpfRoot As Outlook.MAPIFolder
    Dim mpf As Outlook.MAPIFolder
    Dim idx As Integer
    
    Set mpf = Application.Session.GetDefaultFolder(olFolderInbox)
    Set mpfRoot = mpf.Parent
    For idx = 1 To mpfRoot.Folders.count
        MsgBox mpfRoot.Folders.Item(idx).Name
    Next
    
End Sub
		




Show:
© 2014 Microsoft