Smugliy said:
Hi ,
How can I get a list of ALL task fields
When I open MS Project 2007 , ->Insert Column.
I receive a list with all Task Fields (% Complete ..., Start1 ,...,Duration
3 ...,Text1... etc)
It's mean I need also all local and enterprise fields.
Does it exist some way to receive this ENTIRE list
Thanks
Smugliy
Smugliy,
I don't know of any one document that lists all project fields but here
is a rather crude approach to getting all resource and task fields.
Unfortunately assignment fields cannot be obtained in the same way, at
least not with VBA for Project versions prior to 2007, (I don't know
about Project 2007 because I don't have it open).
Fields in Project can be identified by either an alpha constant (i.e.
pjtaskID) or a numeric constant (i.e. 188743703) and numerically these
constants start at a particular value and increment from there. Through
a little research, it appears the starting constant sequence for
resource fields is 205520896, and that happens to be the ResourceID. A
similar starting constant for tasks can be found, but I don't know what
it is.
Given those starting values, a very simply loop can be set up in a VBA
macro to start with the beginning constant value and increment by one
until no more fields are found. The basic code line I would use is:
Application.FieldConstatnToFieldName([incremented values])
The resulting data can be sent to a text file or exported to Excel for a
hardcopy printout.
As I said, this approach is rather crude and if somebody has a better
answer, let him/her step forward - or forever hold their peace. Hey,
it's Sunday!
John
Project MVP