Well, first of all, you have to realize that this only works when there is a 1-1 correspondence.
Let's assume you want to copy task field Number1 to resource field Number1.
If a resource is on 5 tasks,
(a) you will copy Task(1).Number1 to Resource(1).Number1
(b) you will copy Task(2).Number1 to Resource(1).Number1 and overwrite what was already there
(c) you will copy Task(3).Number1 to Resource(1).Number1 and again overwrite what was already there
... and so on.
If you copy from Resource.Number1 to Task.Number1 then what will you do if there are multiple resources assigned to a single task because you're going to end up with the same issue but going the other way.
Here's some vba to help get you started.
Dim tTask As Task
Dim rRes As Resource
Dim aAsgn As Assignment
Dim iTask As Integer
Dim iRes As Integer
Dim iAsgn As Integer
For Each tTask In ActiveProject.Tasks
For iRes = 1 To ActiveProject.Resources.Count
For iAsgn = 1 To ActiveProject.Resources(iRes).Assignments.Count
If ActiveProject.Resources(iRes).Assignments(iAsgn).TaskID = tTask.ID Then
tTask.Text2 = ActiveProject.Resources(iRes).Text1
End If
Next
Next
Next