I'm not sure I understand your clarification request...do you want to use a code like this?
oTask.Work = oTask.TotalTime
This doesn't work, you can only reference a field as a builtin property (Duration2) of the task object (oTask) OR use the relabeled name for a custom field by using this:
oTask.GetField(FieldNameToFieldConstant("TotalTime"))
This only works if you relabeled the field, e.g. Duration2 in the field properties where you set the formula!
Thomas