This is a multi-part message in MIME format.
------=_NextPart_000_0008_01C55700.03B70630
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
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 =3D 0
Const pjSave =3D 1
Set pj =3D CreateObject("MSProject.Project")
pj.Application.Projects.Add False
pj.Application.ActiveProject.Tasks.Add Name=3D"New Task"
' Save and Close Project file and Quit Project
pj.Application.FileSaveAs Name=3D"Project1.mpp", =
FormatID=3D"MSProject.MPP"
'pj.Application.FileClose
pj.Application.Quit pjDoNotSave
pj.close
Set pj =3D 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
------=_NextPart_000_0008_01C55700.03B70630
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2627" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I am tring to dynamically create a =
Project file=20
using ASP with Project installed on the server. Here is the code I have =
so=20
far:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><%<BR>Const pjDoNotSave =3D =
0<BR>Const pjSave =3D=20
1</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Set pj =3D=20
CreateObject("MSProject.Project")<BR>pj.Application.Projects.Add=20
False</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>pj.Application.ActiveProject.Tasks.Add =
Name=3D"New=20
Task"</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>' Save and Close Project file and Quit=20
Project<BR>pj.Application.FileSaveAs Name=3D"Project1.mpp",=20
FormatID=3D"MSProject.MPP"<BR>'pj.Application.FileClose<BR>pj.Application=
.Quit=20
pjDoNotSave</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>pj.close<BR>Set pj =3D =
Nothing</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>%></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I appears to lock up on the FileSaveAs =
line. Does=20
this code look right? What am I doing wrong?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks for any help!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Curtis</DIV>
<DIV><BR></DIV></FONT><%
Const pjDoNotSave =3D 0
Const pjSave =3D 1
Set pj =3D CreateObject("MSProject.Project")
pj.Application.Projects.Add False
pj.Application.ActiveProject.Tasks.Add Name=3D"New Task"
' Save and Close Project file and Quit Project
pj.Application.FileSaveAs Name=3D"Project1.mpp", =
FormatID=3D"MSProject.MPP"
'pj.Application.FileClose
pj.Application.Quit pjDoNotSave
pj.close
Set pj =3D Nothing
%><%
Const pjDoNotSave =3D 0
Const pjSave =3D 1
Set pj =3D CreateObject("MSProject.Project")
pj.Application.Projects.Add False
pj.Application.ActiveProject.Tasks.Add Name=3D"New Task"
' Save and Close Project file and Quit Project
pj.Application.FileSaveAs Name=3D"Project1.mpp", =
FormatID=3D"MSProject.MPP"
'pj.Application.FileClose
pj.Application.Quit pjDoNotSave
pj.close
Set pj =3D Nothing
%></BODY></HTML>
------=_NextPart_000_0008_01C55700.03B70630--