Hi I'm currently running some code in C# below
Application infopath = new Microsoft.Office.Interop.InfoPath.Application(); # falls over here
infopath.RegisterSolution(solution);
I get the following error
System.Runtime.InteropServices.COMException occurred
Message=Retrieving the COM class factory for component with CLSID {8075635F-5146-11D5-A672-00B0D022E945} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
Normally this is an architecture error but I'm compiling the program and targeting x86 which should negate this issue.
I have checked the registry for the CLSID {8075635F-5146-11D5-A672-00B0D022E945} and it does not exist and seem to be the reference for InfoPath 2007. The reference i have in the registry is CLSID {8075735F-5146-11D5-A672-00B0D022E945} which would be 2010
I'm running windows 7 with office 2010. I thought this part of the code just called an instance of InfoPath but it seems to be referencing an older version that doesn't exist. The reference to the application class is in the GAC and installed with office, so no security issues.
Can someone explain to me where I'm going wrong and advise on how to fix this.
Thanks John
life's too short to complain about how short life is