Hello there.
I'm currently trying to read an .mpp file from Dynamics NAV 2016 using .NET variables but experience problems while opening the .mpp file. I receive the error message: "The argument value is not valid."
I would be very grateful if someone could provide more details about how to do this.
I have assigned the variables:
***************************************
AppProject : DotNet Microsoft.Office.Interop.MSProject.ApplicationClass
PjPoolOpen : DotNet Microsoft.Office.Interop.MSProject.PjPoolOpen
sPath : Text C:\Temp\test.mpp
So, I'm insantiating the AppProject and the PjPoolOpen
***********************************************************
AppProject := AppProject.ApplicationClass;
PjPoolOpen := PjPoolOpen.PjPoolReadOnly;
And then I'm trying to open the file:
**************************************
AppProject.FileOpenEx(
sPath,
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
'',
PjPoolOpen,
'',
'',
'',
'',
'')
Thanks in advance!
Best regards,
Sebastien