How to use MS Project in a .net application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to know whether it is possible to use MS Project in a .Net Application.
And what are the ways to be followed to incorporate in .Net Application.
We are using Microsoft .Net Framework 1.0 and sybase 12.5.
if anybody know about this give me suggestions
 
You can read/write MS Project files, however you must have MS Project loaded
on the systems. (I supposed you could create the file without MS Project but
I've never tried). Not sure what you're trying to do but here's some info.

To incorporate, you need a reference to MS Project (don't have that handy at
the moment)

To open a project use code like (code works in VB .Net 2003 - haven't ported
to VS 2005 yet):
Dim pjApp As New MSProject.Application
Dim pjPlan As MSProject.Projects
Dim pjTask As MSProject.Task

lpjPlan = pjApp.FileOpen(sMPP, True, , , , , True, , , , ,
MSProject.PjPoolOpen.pjDoNotOpenPool, , , True)


To read through the project tasks:
For Each pjTask In pjAPP.ActiveProject.Tasks

'Need to see if there is blank line
If Not (pjTask Is Nothing) Then

'do baseline check - you can update it if you want
If Not (TypeOf (pjTask.BaselineFinish) Is Date) Then
pjAPP.BaselineSave(True)


End If
Next

I primarily had to read the data and report. I did create/update .mpp files
but not to great degree.

Hope this helps,
Taras
 
Back
Top