How to Using CustomFieldValueListGetItem to get the values

M

Mani

I created a Task level Text custom Field which is based on the Health Looup
Table. I need to get all the values of this field in my Add-in program. I
used FieldNameToFieldConstanct to get the Id of the field. I pass the id to
CustomFieldValueListGetItem function. But it shows argument not valid error.

here is the coding what i did..
//Getting the Id of Custom Field
pjRoleField =
(MSProject.PjCustomField)project.Application.FieldNameToFieldConstant("DMRoles", Microsoft.Office.Interop.MSProject.PjFieldType.pjTask);

//Getting the First ListValue in the CustomField
string desc = project.Application.CustomFieldValueListGetItem(pjRoleField,

Microsoft.Office.Interop.MSProject.PjValueListItem.pjValueListValue, 1);

When i executed the second statment I get the error: Arguement is not valid..
Anybody help me to get all the ListValues of Health Lookup table...
Thanks in Advance
 

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