01
using
System;
02
using
System.Collections.Generic;
03
using
System.Text;
04
using
Microsoft.Office.Interop.MSProject;
05
06
namespace
ConsoleApplication
07
{
08
class
Program
09
{
10
static
void
Main(
string
[] args)
11
{
12
Program pro =
new
Program();
13
pro.readMpp();
14
15
16
}
17
18
public
void
callMacro()
19
{
20
Object missing = Type.Missing;
21
ApplicationClass prj =
new
ApplicationClass();
22
23
prj.FileOpen(
"C:/Documents and Settings/Administrator/My Documents/test.mpp"
,
24
false
, missing, missing, missing, missing, missing, missing, missing,
25
missing, missing, PjPoolOpen.pjPoolReadWrite, missing, missing, missing, missing);
26
27
prj.Macro(
"testMacro"
);