Outline Codes vs. Custom Fields numbers in 2007

S

Sam

This might be a simple questions but I can't seem to find the answer. We
have recently converted from PS 2003 to PS 2007 and I need to make some
additions to some VBA macros for Project Professional.

In 2003 I was able to reference a field’s value via:

If ActiveProject.ProjectSummaryTask.EnterpriseProjectOutlineCode1 = "(a
specific value)" Then

But when I add new custom fields in PS 2007 I cannot see what their field
number is that I need to reference. Is there an easy way to find this out or
something I'm overlooking?

Thanks,
Sam
 
J

John

Sam said:
This might be a simple questions but I can't seem to find the answer. We
have recently converted from PS 2003 to PS 2007 and I need to make some
additions to some VBA macros for Project Professional.

In 2003 I was able to reference a field’s value via:

If ActiveProject.ProjectSummaryTask.EnterpriseProjectOutlineCode1 = "(a
specific value)" Then

But when I add new custom fields in PS 2007 I cannot see what their field
number is that I need to reference. Is there an easy way to find this out or
something I'm overlooking?

Thanks,
Sam

Sam,
Take a look at the thread for the post titled, "Is field visible in
Current Table", first posted by Johnny on 10/29/3007 in this same
newsgroup. See if that answers your question, or at least gets you
started. If not, can you be more specific in what you want.

John
Project MVP
 
J

Jack Dahlgren

You can use the "FieldNameToFieldConstant" method to return the constant
from the name of the field.
Sounds sort of like what you want.

-Jack
 
S

Sam

That's exactly what I needed. I added the method to the code and it works
perfectly!

Thank you :)
 
Top