Access Assignment Enterprise Field Values

D

Darren_S15

I’ve got a project 2007 plan that is an export of a project server
2007 plan.

In the project server plan they have made use of the Enterprise
Fields.

Unfortunately I need to access these fields in my .mpp file using VBA.

I’ve managed to work out using "ActiveProject.Tasks(1).GetField
(FieldNameToFieldConstant("Custom Field", pjTask))" that I can access
these fields to get the values for tasks and resources.

However on the task usage view of the project plan there is only a
value in the enterprise field against the assignments and not the
actual task.

Here is my problem.

I want to take the value that only appears on the assignment line of
the enterprise field and copy into the task line.

So I need to find out how can I access the values that I can see
against the assignments values because the assignment objects do not
have a GetField method.

I did find a forum post saying using the standard a.FIELD_NAME
assuming you have no spaces in your enterprise field's name, but this
does not appear to work for me.

Any help greatly received.

Sorry for the long post,

Darren
 
M

Mike Glen

HiDarren ,

Try posting on the developer newsgroup as this one is closing down. Please see FAQ Item: 24. Project Newsgroups. FAQs, companion products and other useful Project information can be seen at this web address: http://project.mvps.org/faqs.htm .

Mike Glen
Project MVP



I’ve got a project 2007 plan that is an export of a project server
2007 plan.

In the project server plan they have made use of the Enterprise
Fields.

Unfortunately I need to access these fields in my .mpp file using VBA.

I’ve managed to work out using "ActiveProject.Tasks(1).GetField
(FieldNameToFieldConstant("Custom Field", pjTask))" that I can access
these fields to get the values for tasks and resources.

However on the task usage view of the project plan there is only a
value in the enterprise field against the assignments and not the
actual task.

Here is my problem.

I want to take the value that only appears on the assignment line of
the enterprise field and copy into the task line.

So I need to find out how can I access the values that I can see
against the assignments values because the assignment objects do not
have a GetField method.

I did find a forum post saying using the standard a.FIELD_NAME
assuming you have no spaces in your enterprise field's name, but this
does not appear to work for me.

Any help greatly received.

Sorry for the long post,

Darren
 

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