?
Solved

Is it possible to create a mpp file through C#

Posted on 2006-05-29
4
Medium Priority
?
2,470 Views
Last Modified: 2013-11-15
Hi,

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

Thanks
0
Comment
Question by:proekp
3 Comments
 
LVL 5

Accepted Solution

by:
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
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
 
LVL 35

Expert Comment

by:Bembi
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.
0
 
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.

irwinpks
EE Cleanup Volunteer
0

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