Create a MSProject file online

F

filipeinacio

Hi,

I need to create a MsProject file in a asp.net application an then
send it to msproject in the it as a file to the client.

The data for the file is obtained from two ObjectDataSources in the
web application.


Is there any way to do this.

Filipe
 
J

Jim Aksel

I haven't tried it, but here is how I would go about it in Visual Studio.
In the ASP.NET application, see if you can reference a Microsoft Project
11.0 Object (it would be under References).

At that point, you can instantiate a Project Application, create a project
file.
You would then programatically insert the task information from your two
data sources.
Methods are available to save the file.
You would then send the file on to the client as you would any other file.3

I hacked this out of another project I am working, it shows you how to
create and open a Project file using a VB.NET application. Your mileage will
vary....

'the logic defined on the form to update a specifically identified
'Microsoft Project (*.mpp) file

'*** It is assumed all data on the sending form is valid ****

Public pjApplication As Microsoft.Office.Interop.MSProject.Application

Dim SourceFile As String
Dim tsk As Task
SourceFile = Form1.txtSourceFile.Text.Trim.ToString() 'Data
validated on Form1
'Note: This is an exsiting file as a string, you need to use the object
browser to create a new file.


'Open the file
pjApplication.FileOpenEx(SourceFile)
MsgBox("File: " + pjApplication.ActiveProject.FullName + vbCrLf +
"ID: " + pjApplication.ActiveProject.ID)

'Your code to create the tasks would go here
You would insert steps to create the tasks here.

Sorry I can't be more helpful today --- the most powerful development tool I
have at my disposal at this second is Notepad.

--
If this post was helpful, please consider rating it.

Jim
It''s software; it''s not allowed to win.

Visit http://project.mvps.org/ for FAQs and more information
about Microsoft Project
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top