Need sample code and more information on Project Object hierrarchy

P

ProjectVB

Hello,
We are trying to develop a automation interface from VB6 to MSProject2000 to
generate porject plans automatically
based on our analysis and questionare. I can see the Object Hierrarchy in
the Object browser and on the MSDN website.
I have googled VB and MSProject but have not really come across any good
sample code that walks through the steps of
creating projects, tasks, setting the duration and the predecessor etc.
Also I have not seen any information on the various Objects and what the
mean and how to use them.
Could somebody give me some pointers or sample code for doing this.
I read on one of the replies for a similar to post the question to the group
microsoft.public.project.developer
I could not find this group.
Any help is appreciated.
Thanks
 
R

Rod Gill

Hi,

To get a start, try recording a macro of you manually doing what you want.
The recorded code will help.

Secondly, Help has a full listing of Objects, their properties and methods,
including a fair amount of sample code.

Thirdly, you may find that a quicker way of building a project is to do so
in a database. This can be built without Project running, then opened in
Project to calculate all dates, costs etc. You can either create the
database in Access or any ODBC database such as SQL Server.

To create the database, take any project with at least one task and select
File, Save As

To create an Access project use the .mpd format
To create a database in SQL Server:
First make sure you have a DSN to it
Click the ODBC button or select ODBC from the File Type list (Depends on
which Project version you have)
Select the DSN
Enter a title
OK

To understand the schema and how to add Tasks etc, search your Project
program folders for Projdb.htm (I think its prjdb.htm for Project 2003).

Building via the database is faster and you don't need Project installed on
the PC running the code. You will however need to open the Project to get
calculated fields calculated then re-save.

--
For VBA posts, please use the public.project.developer group.
For any version of Project use public.project
For any version of Project Server use public. project.server

Rod Gill
Project MVP
For Microsoft Project companion projects, best practices and Project VBA
development services
visit www.projectlearning.com/
 

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