Is it possible to create a mpp file through C#

Posted on 2006-05-29
Medium Priority
Last Modified: 2013-11-15

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

Question by:proekp

Accepted Solution

RobertoEscalanteTronco earned 2000 total points
ID: 16785209
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

Office Document Schemas

General XML for Office here:

XML Formats.

An the last one.

Hope this Help.
LVL 35

Expert Comment

ID: 16800677
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.
LVL 30

Expert Comment

by:Irwin Santos
ID: 17022367
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

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

At the office, we’ve started to get serious about organizing what we’re doing. I mean, it was getting to the point where every time I received a phone call, it began with “I know you’re really busy, but…” My boss was taking tasks away from me left a…
"Disruption" is the most feared word for C-level executives these days. They agonize over their industry being disturbed by another player - most likely by startups.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question