In MS Project, is there a way to customize the calendar view where the value of a task level enterprise custom field drives the background color of the task? The GanttBarFormatEx method seems to be limited to a few basic task types - milestones, critical tasks, External, marked, etc.
I don't believe that there is a way to do this. You could probably pick one custom color for the calendar bars based on the value of a custom field by writing a VBA script to check the value and set the Marked field, and then specify the color of "marked" activities. I doubt that will be enough for your desired purpose, though. Or, you could convince one of the project viewer companies (full disclosure -- my company Steelray is one of them) to implement this for you in their viewer. Sounds pretty custom, though.