I
indyvetteguy
I have a project plan that has approximately 300 Parent Task that I
would like to explode into 3 sub task with the same name as the parent
task with a suffix added to the task. So basically I want to:
1) Copy Parent Line
2) Paste Parent Line 3 times
2) Indent Parent Lines to make them Sub Task Lines
3) Append a suffix onto each Sub Task Line to the Parent Name
When I record the macro, it naturally works for that parent, but when I
run it for the next parent, it simply replicates the previous task
names versus pulling the new parent (active line) in the project plan.
Sub Macro1()
' Macro Macro1
' Macro Recorded Sat 11/11/06 by Me.
SelectRow Row:=0
EditCopy
SelectRow Row:=1
EditPaste
EditPaste
EditPaste
SelectRow Row:=0, Height:=2
OutlineIndent
SelectTaskField Row:=0, Column:="Name"
SetTaskField Field:="Name", Value:="Develop Report A - Design"
SelectTaskField Row:=1, Column:="Name"
SetTaskField Field:="Name", Value:="Develop Report A - Code"
SelectTaskField Row:=1, Column:="Name"
SetTaskField Field:="Name", Value:="Develop Report A - Test"
SelectTaskField Row:=1, Column:="Name"
End Sub
So visually I would like the following to occur.
Current Look and Feel of Parent Task in Plan:
Develop Report A
Develop Report B
Develop Interface C
After executing the Macro on a Parent Task Line, I would like to see:
Develop Report A
Develop Report A - Design
Develop Report A - Code
Develop Report A - Test
Develop Report B
Develop Interface C
Naturally I would run the macro against each parent so as to control
what Parent Task get exploded. So basically I just want to
would like to explode into 3 sub task with the same name as the parent
task with a suffix added to the task. So basically I want to:
1) Copy Parent Line
2) Paste Parent Line 3 times
2) Indent Parent Lines to make them Sub Task Lines
3) Append a suffix onto each Sub Task Line to the Parent Name
When I record the macro, it naturally works for that parent, but when I
run it for the next parent, it simply replicates the previous task
names versus pulling the new parent (active line) in the project plan.
Sub Macro1()
' Macro Macro1
' Macro Recorded Sat 11/11/06 by Me.
SelectRow Row:=0
EditCopy
SelectRow Row:=1
EditPaste
EditPaste
EditPaste
SelectRow Row:=0, Height:=2
OutlineIndent
SelectTaskField Row:=0, Column:="Name"
SetTaskField Field:="Name", Value:="Develop Report A - Design"
SelectTaskField Row:=1, Column:="Name"
SetTaskField Field:="Name", Value:="Develop Report A - Code"
SelectTaskField Row:=1, Column:="Name"
SetTaskField Field:="Name", Value:="Develop Report A - Test"
SelectTaskField Row:=1, Column:="Name"
End Sub
So visually I would like the following to occur.
Current Look and Feel of Parent Task in Plan:
Develop Report A
Develop Report B
Develop Interface C
After executing the Macro on a Parent Task Line, I would like to see:
Develop Report A
Develop Report A - Design
Develop Report A - Code
Develop Report A - Test
Develop Report B
Develop Interface C
Naturally I would run the macro against each parent so as to control
what Parent Task get exploded. So basically I just want to