MS Project 2003 automation

C

Chris Alm

I am a .NET developer and need information on how to create, access, and
modify data in a MS Project file through managed code.

I have read information on MS's site about the interop assembly but I have
not been able to find any detailed examples or getting starting guide that
specifically talks about MS Project.

Can someone please point me in the right direction.

Thank you,
Christian
 
C

Chris Alm

Also,

I have installed the Project interop assembly "PIA" as described on MS's
site but it does not show up in my .NET References listbox. I had to
manually copy it out of the GAC into my local projects bin folder just to
get a reference to it. Any idea on why it wouldn't show up in the list as a
..NET available reference?

AND..

When I try to create an object from the PIA I get a the following error
message.

COM object with CLSID {1019A320-508A-11CF-A49D-00AA00574C74} is either not
valid or not registered.

Please help,

Christian
 
K

Karsten Beck

You don't have to copy the assembly to reference it: All interop assemblies
have to be referenced via the COM-Tab (*not* the .NET-Tab!) on the "Add
Reference Dialog". This is a little strange but that's the way Microsoft
describes it. The EXE or Assembly will use the PIA automatically.

You can use the VBA reference of MS Project to get a description about the
classes. If you're using C# you have to pass all arguments that are
described for each method. If you want to pass a default value you can pass
"Type.Missing".

I have no experiences in using VB.NET, but it should be quite similar to
VBA. It may be easier to use VB.NET instead of C# to write automation
programs for MS Project.

Greetings
Karsten
 

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