none
How to Move the child task to below the parent task using Project object model.

    Question

  • I have an xml file which contains Project and tasks node in it. Tasks node will have multiple Task node in it. Each task node might have parent node which will have the id of task(parent of it) or some task might not have parent node, then that task is parent task.

    here i have to loop through each task find the parent task first and corresponding child task.

    so using Project object model, is there any solution to achieve this requirement. ie., Moving child task below the parent task.

    Thanks in advance.

    Thursday, October 14, 2010 6:11 AM

Answers

  • Hi,

    Suppose the parent task's name is ParentName, and the child task's name is Childname

    Set PT=activeproject.tasks("ParentName")

    Set CT=Activeproject.tasks.add(name:="Childname", before:=(PT.ID+1))

    CT.Outlineindent

    Greetings,

    Thursday, October 14, 2010 1:44 PM