V
vj
I use the FileOpen method of the MSProject interop in a
project created in C# in VisualStudio 2002
This is the code and it works just fine.
Code:
MSProject.Application myApp = new
MSProject.ApplicationClass();
tempApp.FileOpen(file, true, PjMergeType.pjDoNotMerge,
true, "", "", false, "", "", "MSProject.mpp", "",
PjPoolOpen.pjPoolReadOnly, "", false, false);
Now I want to do the same thing in VisualStudio 2003 and
now I have to add an extra parameter "XMLName".
I tried to add an empty string ("") and (null).
This compiles with no errors or warnings.
But when I run my application I get an error
message: "System.Runtime.InteropServices.COMException
(0x80004005): The argument value is not valid." on the
call of this method.
I have already looked into the FileOpen method and its
parameters. I'm doing nothing wrong here, but still get
the above error.
Could someone please help me resolve this problem?
Thanks.
vj.
project created in C# in VisualStudio 2002
This is the code and it works just fine.
Code:
MSProject.Application myApp = new
MSProject.ApplicationClass();
tempApp.FileOpen(file, true, PjMergeType.pjDoNotMerge,
true, "", "", false, "", "", "MSProject.mpp", "",
PjPoolOpen.pjPoolReadOnly, "", false, false);
Now I want to do the same thing in VisualStudio 2003 and
now I have to add an extra parameter "XMLName".
I tried to add an empty string ("") and (null).
This compiles with no errors or warnings.
But when I run my application I get an error
message: "System.Runtime.InteropServices.COMException
(0x80004005): The argument value is not valid." on the
call of this method.
I have already looked into the FileOpen method and its
parameters. I'm doing nothing wrong here, but still get
the above error.
Could someone please help me resolve this problem?
Thanks.
vj.