Is it possible to create a mpp file through C#

Hi,

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

Thanks
proekpAsked:
Who is Participating?
 
RobertoEscalanteTroncoCommented:
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/vnd.ms-project"%>
--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
http://www.microsoft.com/downloads/details.aspx?FamilyId=FE118952-3547-420A-A412-00A2662442D9&displaylang=en

Office Document Schemas
http://www.microsoft.com/office/xml/default.mspx

General XML for Office here:
http://msdn.microsoft.com/office/tool/xml/default.aspx


XML Formats.
http://www.microsoft.com/office/preview/itpro/fileoverview.mspx

An the last one.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dno2k3ta/html/odc_ofofficesysxmlinaction.asp

Hope this Help.
0
 
BembiCEOCommented:
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.
0
 
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.

irwinpks
EE Cleanup Volunteer
0
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.