Microsoft Project Member for 22 years 11 months Member for 22 years 11 months Submitted by Tony McClennon on Wed, 2013-05-29 12:32 Permalink Many thanks for looking at Many thanks for looking at the macro - job done!!! Member for 17 years 9 months Member for 17 years 10 months Submitted by Evgeny Z. on Tue, 2013-05-28 23:50 Permalink Tony,I just had few minutes Tony, I just had few minutes free and has written such a Macro. I have tested it in MS Project 2003 and works. It is ready to use (just copy and paste it to the right place) ================================================= Sub SetSummaryTask() ' This function sets the Text1 field of every task ' to a name of it's immediate parent Dim tsks As Tasks Dim t As Task Set tsks = ActiveProject.Tasks For Each t In tsks If Not t Is Nothing Then t.Text1 = t.OutlineParent.Name End If Next t End Sub ================================================= Member for 22 years 11 months Member for 22 years 11 months Submitted by Tony McClennon on Tue, 2013-05-28 08:47 Permalink Thanks for the link - will Thanks for the link - will give it a try and fingers crossed I can make it work!! Member for 17 years 9 months Member for 17 years 10 months Submitted by Evgeny Z. on Fri, 2013-05-24 18:52 Permalink Tony,the only solution I can Tony, the only solution I can think of is to write a Macro in Visual Basic for Applications, which would walk throught all tasks and would fill in the custom field with the name of the summary task, using the OutlineParent Property of a task. http://msdn.microsoft.com/en-us/library/office/aa207578(v=office.11).aspx Regards. Evgeny Log in or register to post comments
Member for 22 years 11 months Member for 22 years 11 months Submitted by Tony McClennon on Wed, 2013-05-29 12:32 Permalink Many thanks for looking at Many thanks for looking at the macro - job done!!!
Member for 17 years 9 months Member for 17 years 10 months Submitted by Evgeny Z. on Tue, 2013-05-28 23:50 Permalink Tony,I just had few minutes Tony, I just had few minutes free and has written such a Macro. I have tested it in MS Project 2003 and works. It is ready to use (just copy and paste it to the right place) ================================================= Sub SetSummaryTask() ' This function sets the Text1 field of every task ' to a name of it's immediate parent Dim tsks As Tasks Dim t As Task Set tsks = ActiveProject.Tasks For Each t In tsks If Not t Is Nothing Then t.Text1 = t.OutlineParent.Name End If Next t End Sub =================================================
Member for 22 years 11 months Member for 22 years 11 months Submitted by Tony McClennon on Tue, 2013-05-28 08:47 Permalink Thanks for the link - will Thanks for the link - will give it a try and fingers crossed I can make it work!!
Member for 17 years 9 months Member for 17 years 10 months Submitted by Evgeny Z. on Fri, 2013-05-24 18:52 Permalink Tony,the only solution I can Tony, the only solution I can think of is to write a Macro in Visual Basic for Applications, which would walk throught all tasks and would fill in the custom field with the name of the summary task, using the OutlineParent Property of a task. http://msdn.microsoft.com/en-us/library/office/aa207578(v=office.11).aspx Regards. Evgeny
Member for
22 years 11 monthsMany thanks for looking at
Many thanks for looking at the macro - job done!!!
Member for
17 years 9 monthsTony,I just had few minutes
Tony,
I just had few minutes free and has written such a Macro.
I have tested it in MS Project 2003 and works. It is ready to use (just copy and paste it to the right place)
=================================================
Sub SetSummaryTask()
' This function sets the Text1 field of every task
' to a name of it's immediate parent
Dim tsks As Tasks
Dim t As Task
Set tsks = ActiveProject.Tasks
For Each t In tsks
If Not t Is Nothing Then
t.Text1 = t.OutlineParent.Name
End If
Next t
End Sub
=================================================
Member for
22 years 11 monthsThanks for the link - will
Thanks for the link - will give it a try and fingers crossed I can make it work!!
Member for
17 years 9 monthsTony,the only solution I can
Tony,
the only solution I can think of is to write a Macro in Visual Basic for Applications, which would walk throught all tasks and would fill in the custom field with the name of the summary task, using the OutlineParent Property of a task.
http://msdn.microsoft.com/en-us/library/office/aa207578(v=office.11).aspx
Regards.
Evgeny