Is it possible to create a mpp file through C#


Is is possible to create a mpp file through C#. Can you point me to the urls?

Who is Participating?
Greetings, Yes it is .!

I think theres  more than one way to do it , but i think thi is an easy one.

You can use XML to build the file.

In past i have tho make an asp page with .NET (vb or c#)  that construct a mpp file in the user machine via streaming.
I acomplished that with the following tasks.

1.- open proyect
2.- create a simple project (couple of tasks, dependencies, milestones)
3.- Save the project as XML
4.- Close project.

( Project can open an XML file: try opening project,  and the opening the xml file you created)

5.-  Insert in a simple asp page the following to stream the xml file to the client. (This is VB sample)

<%@  language="VBScript" %>
  <%Response.AddHeader "Content-Disposition", "attachment;filename=xml2mpp.mpp"
  Response.ContentType = "application/"%>
--Your XML File  HERE--
<?xml version="1.0"?>...

This will stream the file to the user and construct any project file via XML,

Note:  you can analize the xml file and construct any mpp or office file with  XML DOM (Model)

If you need more info about  this way to do itlink to how to use this

Download the XML Reference Schemas

Office Document Schemas

General XML for Office here:

XML Formats.

An the last one.

Hope this Help.
I have not links at the moment, but just some general ideas.

As you can add the MS Office Project object library to your project, you have access to the complete object model of MS Project. Accessing this object model, you can do everything by code as you can do with MSP. Nevertheless, due to licence issues, you can only use the object library on machines, where MS Project is installed. You are not allowed to distribute MS Office DLLs to computers, which have no own licence.
Irwin SantosComputer Integration SpecialistCommented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept - RobertoEscalanteTronco

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.