Table of contents
Collapse the table of content
Expand the table of content

Application.TimelineInsertTask Method (Project)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

When the Timeline view is selected, displays the Task Information dialog box, and then inserts a new task into the project and adds the task to the Timeline view.


expression. TimelineInsertTask( ** Type** )

expression An expression that returns an Application object.


NameRequired/OptionalData TypeDescription
TypeRequiredPjTimelineInsertTaskTypeSpecifies the type of task; that is, whether the task is a regular task, a milestone, or a callout task. Can be one of the following PjTimelineInsertTaskType constants: pjTimelineInsertTask, pjTimelineInsertMilestone, or pjTimelineInsertCalloutTask. Any of the task types can be manually or automatically scheduled.

Return Value



The TimelineInsertTask method shows a manually scheduled or automatically scheduled task in the Task Information dialog box, depending on the type of task shown in the New Tasks section of the Project status bar.

If the user cancels the Task Information dialog box, TimelineInsertTask returns False.

Note The ** Display on Timeline** check box in the Task Information dialog box is clear. The TimelineInsertTask method adds a task to the timeline whether the check box is checked or clear.

The TimelineInsertTask method corresponds to the Task, Callout Task, and Milestone commands in the Insert group on the Format tab on the ribbon. The Format tab displays the Insert group when the Timeline view is selected. If the Timeline view is not selected, the TimelineInsertTask method results in error 1100, "The method is not available in this situation."


If the Project status bar shows New Tasks: Manually Scheduled, the following statement displays the Task Information dialog box, which prompts the user to name a manually scheduled task. The default start date is the project start date. When the user clicks OK, Project inserts the task in the Gantt chart and shows the new task on the timeline, with the task information in a callout box attached to the timeline.

Application.TimelineInsertTask Type:=pjTimelineInsertCalloutTask
© 2018 Microsoft