Application.TimelineFormat method (Project)

Formats the Timeline view to specify the number of text lines in timeline tasks and whether to show or hide details.


expression. TimelineFormat( _NumLines_, _Minimized_ )

expression An expression that returns an Application object.


Name Required/Optional Data type Description
NumLines Optional Variant Number of text lines to show in tasks on the timeline. Values can be 1 through 10; other values are ignored.
Minimized Optional Boolean If true, minimizes the timeline so that tasks do not show details. If false, vertically expands the timeline so that tasks show detail text lines.

Return value



The TimelineFormat method parameters correspond to the Text Lines command and the Detailed Timeline command on the Format tab for Timeline Tools in the ribbon.

If the timeline does not show tasks, the Minimized parameter has no effect. If the Timeline view is not active, the TimelineFormat method results in run-time error 1100, "Application-defined or object-defined error."


If the timeline shows one or more tasks, the following example sets four text lines in each task and expands the timeline to show all four lines.

Sub FormatTimeline() 
    TimelineFormat NumLines:=4, Minimized:=False 
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.