Custom Field(s) at Project level

M

MWE

I am running Project2000. I am looking for ways, using VBA, to store
information in the project object at the project level. I know about the
custom fields to store information at the task level. My need is to store
info at the project or file level. Are there any project or file level
"custom" fields?

Any help would be appreciated.

The FileProperties object(?) would work (I could use the comments field) if
I knew its structure and how to interact with it. Not the best solution,
but ...

Thanks
 
J

John

MWE said:
I am running Project2000. I am looking for ways, using VBA, to store
information in the project object at the project level. I know about the
custom fields to store information at the task level. My need is to store
info at the project or file level. Are there any project or file level
"custom" fields?

Any help would be appreciated.

The FileProperties object(?) would work (I could use the comments field) if
I knew its structure and how to interact with it. Not the best solution,
but ...

Thanks

MWE,
Take a look at the DocumentProperties Object and/or the
DocumentProperties Collection Object.

Hope this helps.
John
Project MVP
 
M

MWE

John said:
MWE,
Take a look at the DocumentProperties Object and/or the
DocumentProperties Collection Object.

Hope this helps.
John
Project MVP
*********************************
John: thanks for the prompt reply. I had already looked at both the
BuiltinDocumentProperties and the CustomDocumentProperties. The problem is
(or appears to be) that both are READ ONLY. VBA Help states "...Returns a
DocumentProperties collection representing the custom properties of the
document. Read-only....". Not trusting VBA Help, I poked around the object
browser and tried a few code examples, but the READ ONLY appears to be
correct. If DocumentProperties and FileProperties are the same, it is
strange that DocumentProperties would be read only.

MWE
 
J

JackD

The COLLECTION of properties is read only. That is you can't add new kinds
of properties. The individual properties are read/write.
 
J

Jan De Messemaeker

Hi,

Let me demistify this becaus I do this frequently and I have used both
methods, the customdocumentproperties way as well as the custom fiels way.

The latter is the simplest as for coding purposes:
activeproject.projectsummarytask.text7=....

The result can be made visible by showing the project summary task.
One of the drawbacks is that when someone cutomizes the field, with a
process for the summary tasks, the value you entered may be destroyed.

As for custom document properties:

Look for help on the add method for customdocument properties.
Once they are added you can set a value.
You may have a problem here that when you try to add one that already exists
the program gives an error condition, thus before dding check the names af
all properties present.

The really nice thing is to set all of these for the global.mpt project...
it took me a few days to discover tjose, but evn that is possible.

HTH
 
M

MWE

HTH: thanks, your suggestion was very helpful. I poked around the object
browser looking for what has turned out to be the project summary task. That
approach will be fine.

MWE

************************************
 
N

Nkiefer

Thank you! I have used the CustomDocumentProperties to create project
variables and it works. When I look at custom under File-Properties they are
there. However when I close the Project and reopen they are gone. My
global.mpt file is shared (on a file server) by others in my group, is that
the problem? If so how do I save the info in the project.mpp file?
 
J

Jan De Messemaeker

Hi,

This is a mistery to me.
In principle, Custom Doc Properties are in the file, not in the global.
So when you save the file they should remain there.
I do have to admit I never ever worked with a share global so I have no
experience there.
Are you sure you saved the file, i.e. that it wasn't opened by someone else
when you put the properties?
 
N

nakiefer

It must be a project central thing. We are using Project 2000 with Project
Central. If I create a project and save it to my hard drive and then reopen
it, the custom fields are there. If I open a project from the database,
create the custom fields and check in File - Properties the custom fields and
their values are listed in the custom tab. Once I save the project back to
the database and then reopen it, the custom fields are gone, in facst there
are no fields listed in the custom tab.
 
J

Jan De Messemaeker

It definitely must be a Poject Central thing, as you noticed yourself,
without it there is no problem.
Greetings,
 
N

nakiefer

I'll continue to investigate, Project central and will post a solution if I
ever find one.
 

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