A
Anton
Hellow!
I try get task items:
MSProject.Application pjApp = new MSProject.Application();
pjApp.FileOpen(@"D:\sample.mpp", Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing,
Type.Missing, Type.Missing, PjPoolOpen.pjPoolReadWrite, Type.Missing,
Type.Missing, Type.Missing, Type.Missing);
for (int i = 1; i < pjApp.ActiveProject.Tasks.Count; i++)
MessageBox.Show(pjApp.ActiveProject.Tasks.Name.ToString());
pjApp.Quit(PjSaveType.pjDoNotSave);
When I run this code I get following error: HRESULT E_FAIL.
When I wrong?
I try get task items:
MSProject.Application pjApp = new MSProject.Application();
pjApp.FileOpen(@"D:\sample.mpp", Type.Missing, Type.Missing, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing,
Type.Missing, Type.Missing, PjPoolOpen.pjPoolReadWrite, Type.Missing,
Type.Missing, Type.Missing, Type.Missing);
for (int i = 1; i < pjApp.ActiveProject.Tasks.Count; i++)
MessageBox.Show(pjApp.ActiveProject.Tasks.Name.ToString());
pjApp.Quit(PjSaveType.pjDoNotSave);
When I run this code I get following error: HRESULT E_FAIL.
When I wrong?