Forum Discussion

LisaJanssen's avatar
LisaJanssen
Copper Contributor
Mar 14, 2024
Solved

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

  • John-project's avatar
    John-project
    Silver Contributor

    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.

    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's avatar
        John-project
        Silver Contributor
        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

Resources