none
Reading an Enterprise Field from an mpp File RRS feed

  • Question

  • An mpp file is created from Project Server 2007. Two enterprise fields are included in the file.  The fields are visible on the Gantt view and even have headings, but we do not see a field name for either of the fields. How does our VBA code access the field?

    Friday, September 3, 2010 3:07 PM

Answers

  • Hi Rob,

    Use Fieldnametofieldconstant to get the fieldid

    Then use Getfield or Setfield to read and write.

    • Marked as answer by RobVV Friday, September 3, 2010 6:16 PM
    Friday, September 3, 2010 3:23 PM
    Moderator

All replies

  • Hi Rob,

    Use Fieldnametofieldconstant to get the fieldid

    Then use Getfield or Setfield to read and write.

    • Marked as answer by RobVV Friday, September 3, 2010 6:16 PM
    Friday, September 3, 2010 3:23 PM
    Moderator
  • Thanks, Jan. Here is the code I used:

    Dim t as Task
    Dim Fld1 as Pjfield
    Dim Val1 as Single

    Fld1 = Application.FieldNameToFieldConstant("Enterprise Field 1", pjTask)
    <loop through tasks>
         Val1 = t.GetField(Fld1)
    <end loop>

    Friday, September 3, 2010 6:21 PM