N
Navaneeth
I have created a asp.net website using C# which takes a ms project file as an
input and reads the data from the mpp file.
In the mpp file I have a column which is a custom field(Text1) and has a
lookup values in it(Entries for cells in the column are limited and can be
selected only from drop down). For eg, I have a column called color and the
column can consist of only RED or BLUE or GREEN. So the column has a look up
value with the three colors in it.
I create an interop object for ms project and I also open the file. SO here
is how it goes.
using Microsoft.Office.Interop.MSProject;
ApplicationClass appSampleProject = new ApplicationClass();
bool bOpen = appSampleProject.FileOpen(fileName, true,
PjMergeType.pjDoNotMerge, oMissing, oMissing, oMissing, oMissing, oMissing,
oMissing, oMissing, oMissing, PjPoolOpen.pjDoNotOpenPool, password, oMissing,
oMissing, oMissing);
Project proSample = appSampleProject.ActiveProject;
So before I loop through the tasks, I want to get the count of predefined
values present in the column and the values. I know how I can get the
values. This is how I get.
proSample.Application.CustomFieldValueListGetItem(PjCustomField.pjCustomTaskText1,PjValueListItem.pjValueListValue,1)
So in the above code I mention that I need to get the value for the custom
field(Text1) at index position 1
But how can I find the total count of predefined values present in the
column by using only the project object and without looping through tasks
individually.
input and reads the data from the mpp file.
In the mpp file I have a column which is a custom field(Text1) and has a
lookup values in it(Entries for cells in the column are limited and can be
selected only from drop down). For eg, I have a column called color and the
column can consist of only RED or BLUE or GREEN. So the column has a look up
value with the three colors in it.
I create an interop object for ms project and I also open the file. SO here
is how it goes.
using Microsoft.Office.Interop.MSProject;
ApplicationClass appSampleProject = new ApplicationClass();
bool bOpen = appSampleProject.FileOpen(fileName, true,
PjMergeType.pjDoNotMerge, oMissing, oMissing, oMissing, oMissing, oMissing,
oMissing, oMissing, oMissing, PjPoolOpen.pjDoNotOpenPool, password, oMissing,
oMissing, oMissing);
Project proSample = appSampleProject.ActiveProject;
So before I loop through the tasks, I want to get the count of predefined
values present in the column and the values. I know how I can get the
values. This is how I get.
proSample.Application.CustomFieldValueListGetItem(PjCustomField.pjCustomTaskText1,PjValueListItem.pjValueListValue,1)
So in the above code I mention that I need to get the value for the custom
field(Text1) at index position 1
But how can I find the total count of predefined values present in the
column by using only the project object and without looping through tasks
individually.