Open DigitalSolo opened 7 years ago
Hi
Have you previously had any other versions of Office installed on the PC?
Exactly which version of Office 2016 is installed - standard / professional / other?
Have you tried un-installing and re-installing Office, or performing a repair on the installation?
Is this the "Office 365 ProPlus Click-to-Run" version of Office? We have seen issues where this install does not include the options needed by OfficeToPDF: https://officetopdf.codeplex.com/workitem/55
Regards Vittal
Hey @vittala : Sorry, the codeplex link is dead. What was the solution?
I have MS Office 2016 and .Net 4.7.02 installed. I tried several document conversions and the error is:
Unable to cast COM object of type 'Microsoft.Office.Interop.Word.ApplicationClass' to interface type 'Microsoft.Office.Interop.Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).
Unhandled Exception: System.InvalidCastException: Unable to cast COM object of type 'Microsoft.Office.Interop.Word.ApplicationClass' to interface type 'Microsoft.Office.Interop.Word._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00020970-0000-0000-C000-000000000046}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)). at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease) at Microsoft.Office.Interop.Word.ApplicationClass.Quit(Object& SaveChanges, Object& OriginalFormat, Object& RouteDocument) at OfficeToPDF.WordConverter.Convert(String inputFile, String outputFile, Hashtable options) at OfficeToPDF.Program.Main(String[] args)