Share via


Task.OutlineParent Property

Project Developer Reference

Returns a Task object representing the parent of a task in the outline. Read-only Object.

Syntax

expression.OutlineParent

expression   A variable that represents a Task object.

Example
The following example displays the names of all tasks at the same outline level as the selected task.

Visual Basic for Applications
  Sub Siblings()
Dim MyParent As Task
Dim Sibling As Task
Dim Temp As String

Set MyParent = ActiveCell.Task.<strong class="bterm">OutlineParent</strong>

For Each Sibling In MyParent.OutlineChildren
    Temp = Sibling.Name &amp; ListSeparator &amp; " " &amp; Temp
Next Sibling

Temp = Left$(Temp, Len(Temp) - Len(ListSeparator &amp; " "))
MsgBox Temp

End Sub

See Also