Setting a Task to A SubProject

Contents
[ Hide Show ]

Microsoft Project provides the option to set a task to another project, known as sub-project to the parent project. Aspose.Tasks for .NET API provides the same capability to set a task to another sub-project using the Tsk.SubProjectName property.

Setting a Task to a SubProject

1Project project = new Project("New Project.mpp");
2
3// Add task
4Task task = project.RootTask.Children.Add("Task 1");
5
6// Setting new subproject link
7task.Set(Tsk.SubprojectName, "subProject.mpp");
8
9project.Save("SubProjectTask_out.mpp", SaveFileFormat.MPP);
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.