Application.OutlineShowTasks method (Project)

Expands an outline to show all tasks up to the specified level and collapses any levels below.


expression. OutlineShowTasks( _OutlineNumber_, _ExpandInsertedProjects_ )

expression A variable that represents an Application object.


Name Required/Optional Data type Description
OutlineNumber Optional Long The outline level to display. Higher outline levels are expanded to show this level. The level specified with OutlineNumber and lower (if any) are collapsed. Can be one of the PjTaskOutlineShowLevel constants.
ExpandInsertedProjects Optional Boolean True if tasks from subprojects are affected by the value specified with OutlineNumber. The default value is False.

Return value



This example has the same effect as collapsing the entire outline, including any tasks from subprojects.

Sub CollapseOutline() 
 Application.OutlineShowTasks pjTaskOutlineShowLevel1, True 
End Sub

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.