Application.InsertTask method (Project)

Inserts a new task of the default mode above the selected task row or cell in a Gantt chart.


expression. InsertTask

expression An expression that returns an Application object.

Return value



The InsertTask method corresponds to the Insert Task command on the right-click option menu in a list of tasks. The new task is the default mode (manually or automatically scheduled), contains a task ID number, and the Task Name cell is selected with . Each task ID below the new row increases by one.

By comparison, the InsertBlankRow method creates a blank row, where additional task information can be added programmatically. To create a manually scheduled task where the default mode is automatic, use the InsertManualTask method. To create an automatically scheduled task where the default mode is manual, use the InsertScheduledTask method.

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.