CQ said:
At the risk of making you hurt yourself by laughing, I have a question. I
see in some of the posts where you write code about certain fields. How do
you know which table/field to reference? I have not found any material that
tells me what fields in Project 2007 exist to reference. How do you find
this information?
CQ,
We are forbidden from laughing at posters since on occasion our
responses are done in the heat of battle with too little sleep or not
enough coffee, and that tends to make us the laughing stock.
Furthermore, there are no dumb questions... but we do have a few dumb
answers
When using VBA, the view table is immaterial since all possible code
should be written using background processing, that is, directly
accessing Project's objects. It's easier to write and runs faster.
There are three basic objects in Project, Task, Resource and Assignment.
You can view the complete Project Object Model by going to
Tools/Macro/Visual Basic Editor. When the VB Editor window opens, go to
Help/Microsoft Visual Basic Help. Then select Microsoft Office Visual
Basic Reference. The object model is in that folder. One caveat, the
exact menu callouts noted above may be different for Project 2007 - I
currently have Project 2003 running and what is stated above if for
Project 2003.
Another excellent source for Project VBA syntax, is through the Object
Bowser (although in my opinion the developers really went a step
backwards in this area for Project 2007 - what a shame - the Object
Browsers for previous versions of Project were a whole lot more useful).
The Object Browser can be accessed from the VB Editor under View/Object
Browser. You may need to set a reference to the Project Object library
under Tools/Reference if it doesn't show up in the libraries selection
box of the browser.
From the above, it's a matter of working with Project VBA to gain
familiarity with Project's objects. An excellent book on the subject was
written by fellow MVP, Rod Gill. For more information about Rod's book,
go to,
http://www.projectvbabook.com
Hope this helps.
John
Project MVP