Can I open a indd file whitin c# and print/make a pdf of it´s content? I`ve installed VS2010 and InDesign aswell. I have a reference to "Adobe InDesign CC 2018 Type Library" in Visual Studio. My code is asfollows.

Then I get the error message: {System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'InDesign.Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{ABD4CBB2-0CFE-11D1-801D-0060B03C02E4}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

I feel like I´ve miss something in my installation. Is it correct to just install InDesign CC and VS2010 sp1. Then make a reference in VS2010 to "Adobe InDesign CC 2018 Type Library". Is that all or do I need to install some SDK or CS6 kit???