Creating a project using ASP

C

Curtis Tammany

Hi.

I am tring to dynamically create a Project file using ASP with Project installed on the server. Here is the code I have so far:

<%
Const pjDoNotSave = 0
Const pjSave = 1

Set pj = CreateObject("MSProject.Project")
pj.Application.Projects.Add False

pj.Application.ActiveProject.Tasks.Add Name="New Task"

' Save and Close Project file and Quit Project
pj.Application.FileSaveAs Name="Project1.mpp", FormatID="MSProject.MPP"
'pj.Application.FileClose
pj.Application.Quit pjDoNotSave

pj.close
Set pj = Nothing
%>

I appears to lock up on the FileSaveAs line. Does this code look right? What am I doing wrong?

Thanks for any help!

Curtis
 

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