How To integrate MS Project in VB.NET?

vinidel

Member
Joined
Jan 8, 2004
Messages
7
Hi All,

I am using following code to use Microsoft Project 2003 object model in VB.NET

Imports Microsoft.Office.Interop.MSProject

Also I have references set to Microsoft Project 11.0 Object Library

I have two questions:

1. When I use following code to instantiate an object, I do not get any compile errors.

Dim proj As Project
proj = New Project

But when I run my VB.NET code I do get following error at above code:

An unhandled exception of type System.Runtime.InteropServices.COMException occurred in ProjectTest.exe
Additional information: COM object with CLSID {1019A320-508A-11CF-A49D-00AA00574C74} is either not valid or not registered.


2. Second question: I want my VB.NET code to check the user system, on which its running to check Microsoft Project 2003 is running(means user is using Microsoft Project 2003).

Any suggestion, help or guidance will be appreciated.

Thanks

vinidel
 
HI all,

I got the answeres to my questions. :)
I found out that best approach is to call VB.NET application using SHELL command, and passing the parameter that I need in VB.NET application. So I dont have to create an object of MS PRoject inVB.NET and complicate it more.

Thanks Anyway,

vinidel
 
Back
Top