Read Project Custom Field value in Project 2007 via VBA

C

Claudio Hidetoshi

I have to implement the Sub Project_BeforeSafe to get a project custom field
value, entered by the user in Project Summary Task.
Depending of the value, I have to set other four project custom fields'
values.

I have it working in Project Server 2003, but PPS2007 does not suport some
objects used.

I saw many examples using PSI methods to set and get those fields. But I
have to get and set those fields before saving, and the project may not exist
in Project Server database yet.

Thanks,

Cláudio Hidetoshi.
 
A

Adam Behrle

Cláudio,

If you end up doing this in VBA, you shouldn't need to worry about the
PSI. The GetField/SetField commands should give you what you need.

However, Project Server 2007 does provide a way to capture these types
of events on the server. This is cleaner because you don't need to
worry about whether or not macros are enabled on the project client
applications. In this scenario, you could capture the OnSaved event
and manipulate the custom fields through the PSI.

See Server Side Events in the SDK for more info.

Good luck!

Adam
 
C

Claudio Hidetoshi

Thanks Adam,

I know that Project Server events are the best way to do that.
But, in the client migration contract, we have to make minimal code
modifications.

The migrated code has to be like the old one. Or similiar.

After migration project, we will propose new changes (like Project Server
events usage).

And about GetField and SetField methods, they worked perfectly for me.

Thanks again.
 

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