如何加载" Project Server"项目与Microsoft.Office.Interop.MSProject C#

时间:2016-08-10 15:37:30

标签: c# .net office-interop ms-project project-server

如何告诉MS Project在.NET C#中使用Microsoft.Office.Interop.MSProject加载Project Server项目?

我知道如何使用下面的代码加载MPP文件。但是,如何从Project Server或Project Web Access加载项目?

我使用下面的代码使用Microsoft.Office.Interop.MSProject加载MPP文件:

Microsoft.Office.Interop.MSProject.Application app = new Microsoft.Office.Interop.MSProject.Application();
app.FileOpenEx(sMPPPathname, false, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
    MSProject.PjPoolOpen.pjPoolReadWrite,
    Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);

1 个答案:

答案 0 :(得分:0)

FileOpenEx命令对Project Server的工作方式相同,您只需要将此语法用于filename参数:"<> \ ProjectName"。

MS项目对象模型:FileOpenEx Method