Forum Discussion
LisaJanssen
Mar 14, 2024Copper Contributor
Timeline
Hi,
I am new to using Microsoft Project.
I have combined 2 projects into a master file. I would like to create a timeline, but I need to add the summary name to task.
Both my projects have a task manufacturing, I am trying to show on the timeline where they both fall, but show they are for different projects.
Thanks
- LisaJanssen,
This should do it. Run it at master level and then close the master. You will get a couple of messages asking if you want to save changes. Answer "yes" to the first message and "yes to all" on the second message.
John
Sub AddProjToSubsAtMstrLevel()
Dim t As Task
Dim sp As Subproject
For Each t In ActiveProject.Tasks
t.Name = t.Project & " - " & t.Name
Next t
End Sub
7 Replies
Sort By
- John-projectSilver Contributor
Yes that can be done but you will have to physically add the Project designator to each task in each subproject. For example, in this master file with three inserted subprojects each subproject has a "task 2". A project designator is prefixed on each subproject task.
So what's the best way to add the prefix? Well, there are two methods. One is to manually type it in and the other is via a simple macro. If you're interested in the latter, I can provide that.
Hope this helps.
John
- LisaJanssenCopper Contributor
John-project , Thanks John, yes I would also like to see the Macro
- John-projectSilver ContributorLisaJanssen,
This should do it. Run it at master level and then close the master. You will get a couple of messages asking if you want to save changes. Answer "yes" to the first message and "yes to all" on the second message.
John
Sub AddProjToSubsAtMstrLevel()
Dim t As Task
Dim sp As Subproject
For Each t In ActiveProject.Tasks
t.Name = t.Project & " - " & t.Name
Next t
End Sub