MSP 2007 - Accessing Enterprise Custom fields in VBA

C

Craig L M

In MSP 2003 if I wanted to access a task level custom field in VBA, I could
loop through the tasks and use Task.EnterpriseText3 for example. I see where
the use of the numbered custom fields has been depricated and hidden in 2007.
So lets say I have a new Enterprise custom field called "My Custom Text
Field" that I created in PWA. How do I then access it at the task level in
VBA? I can't seem to find this answer anywhere and it should be a simple
enough question.

I have seen reference to the Task.Getfield, but the examples I have seen all
use either Outline codes, or one of the pjField constants, which doesn't help
me with an Enterprise custom field.
 
V

Vadim Gerya

Hi !

You created enterprice task custom text field in PS2007, for example "Name" .
___________________________
Dim Name_ as string
Dim Task_ as task
...
...
Name_ = FieldNameToFieldConstant("Name")
Call Task_.SetField(Name, expression)
text_variable = Task_.GetField(Name)
___________________________
For more information go through help on FieldNameToFieldConstant, SetField
and GetField .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top