class MsProjectTest
{
Project p ;
object m = Missing.Value;
string file = @"c:\temp\test.mpp";
public void Process()
{
Application app = new Application();
app.Alerts(false);
p = app.Projects.Add(m,m,m);
Task t = p.Tasks.Add("Test", m);
t.Name = "Test Node";
t.Start = "03/20/2009";
t.Start7 = "03/31/2009";
p.Application.TableEdit("Entry", true, m, m, m, m,
"Start7", "Start Test", 10, PjAlignment.pjLeft,
true, true, 255, 1, 4, 1, m, m);
p.Application.TableApply("Entry");
p.SaveAs(file, PjFileFormat.pjMPP, m, m, m, m,
m, m, m, m, m, m, m, m, m);
app.Quit(PjSaveType.pjDoNotSave);
System.Diagnostics.Process.Start(file);
}
}
I hope this helps some other interop developer out
there struggling with the same issue.
No comments:
Post a Comment