Problem with FileOpen method of MSProject interop.
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.
can anyone tell me what is wrong.
Thanks,
Johan.