If you have poked around VBA in Project Professional 2007 you may have noticed that there is not what I would call "direct" object model access to the enterprise custom fields you create in Project Server 2007. For one thing these fields are not like they were in Project Server 2003. In 2003 you got 30 Outline Code fields and you renamed them but via VBA you still accessed the field as OutlineCodeXX. In 2007 you create enterprise fields 'from scratch.' They are not just renamed fields. They are new fields. The object model is not dynamic in a way that allows it to add new members as they are created. This means that you cant just get to a field by the old method: Activeproject.Tasks(1).OutlineCode1.
To access an Enterprise Task field called "Task Alignment" you would use the following code:
Activeproject.Tasks(1).GetField(FieldID:=Application.FieldNameToFieldConstant(FieldName:="INSERT FIELD NAME),FieldType:=pjTask)
You use the GetField method. This method requires the FieldID. To get the FieldID (since it is unlikely you know it) you use the FieldNametoFieldConstant method.