Is it possible to create a mpp file through C#

Posted on 2006-05-29
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
    LVL 5

    Accepted Solution

    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.
    LVL 35

    Expert Comment

    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

    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Online collaboration is quickly becoming embedded in the workplace, and its benefits are tangible. See what the current landscape looks like and what the future holds for collaboration tools and the future of work.
    "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.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    758 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now