没有VS的Microsoft Project 2010自动化

没有VS的Microsoft Project 2010自动化

问题描述:





我寻求如何从脚本中启动Microsoft Project 2010中的mpp文件。我发现Microsoft Project Object Library参考是必要的。但我无法在Visual Studio中实现它。你能建议如何正确引用并通过脚本启动mpp
文件吗?我试过这个(脚本中没有对象引用):



<%

Dim pjApp As Object

设置pjApp = CreateObject(" MSProject.Application")

pjApp.Visible = True

%>
Hi,

I seek the way how to launch an mpp file in Microsoft Project 2010 from a script. I found the Microsoft Project Object Library reference is necessary. But I cannot make it in Visual studio. Could you suggest how to make the correct reference and to launch mpp file by a script? I tried this (there is no object reference in the script):

<%
Dim pjApp As Object
Set pjApp = CreateObject("MSProject.Application")
pjApp.Visible = True
%>

由于您使用了对象,因此不需要对Project的引用。

As you have used an object, a reference to Project is not needed.

 

什么脚本,你在写这个语言吗?

What script, language are you writing this in?