Had the same problem. Got this answer:
Problem
---------
The problem with the macro was because the variable "asnA" was pointing
nowhere. I mean there was no "task assignment" associated to that variable.
Solution
--------
Each task has 0 or more assignements to it. Those assignments are in the
task property "Assignments" and that property has a table of Items. Each
item is an assignment.
task
assignments
item(1) 'Assignemnt 1
item(2) 'Assignemnt 2 item(3) 'Assignemnt 3
...
So the Task Enterprise Outline code must be copied on each item
(assignement)
tskT.Assignments.Item(i).EnterpriseResourceOutlineCode5 =
tskT.EnterpriseOutlineCode1
You should replace the main part of the macro with following :
If Application.Projects.Count > 0 Then
If ActiveProject.Tasks.Count > 0 Then
For Each tskT In ActiveProject.Tasks
If Not (tskT Is Nothing) Then
nbItems = tskT.Assignments.Count
If nbItems > 0 Then
For i = 1 To nbItems
tskT.Assignments.Item(i).EnterpriseResourceOutlineCode5 = _
tskT.EnterpriseOutlineCode1 Next i
End If
End If
Next tskT
End If
End If
I hope it will help you.
Hugues Perron