Skip to content

Latest commit

 

History

History
62 lines (35 loc) · 2.68 KB

Project.Application.TimelineInsertTask.md

File metadata and controls

62 lines (35 loc) · 2.68 KB
title keywords f1_keywords ms.service api_name ms.assetid ms.date ms.localizationpriority
Application.TimelineInsertTask method (Project)
vbapj.chm65
vbapj.chm65
project-server
Project.Application.TimelineInsertTask
4a1833a4-ddbb-577d-fe58-5907644fd127
06/08/2017
medium

Application.TimelineInsertTask method (Project)

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.

Syntax

expression. TimelineInsertTask( _Type_ )

expression An expression that returns an Application object.

Parameters

Name Required/Optional Data type Description
Type Required PjTimelineInsertTaskType Specifies 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

Boolean

Remarks

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."

Example

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

[!includeSupport and feedback]