SOLVED

Timeline

Copper Contributor

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

 

 

7 Replies

@LisaJanssen,

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.

2024-03-14_11-19-26.png

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

@John-project , Thanks John, yes I would also like to see the Macro 

best response confirmed by Dale_HowardMVP (MVP)
Solution
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
Thanks for all the help John, it does not like this string
t.Name = t.Project & " - " & t.Name
LisaJanssen,
Are you running the macro at master level?

When you get the error message, hit the "Debug button". Then hover you mouse over each of the arguments in the string. What do you see for each?

Could you post a screen shot of your master?

John
Woohoo, I do have it working.
LisaJanssen,
Whoa, now you scaring me.

So, you're saying we're good, right?

John
1 best response

Accepted Solutions
best response confirmed by Dale_HowardMVP (MVP)
Solution
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

View solution in original post