I try to add a document from template with Microsoft.Office.Interop.Word, using:
Microsoft.Office.Interop.Word.Aplication wordApp =
new Microsoft.Office.Interop.Word.Application();
wordApp.Documents.Add("somedoc.dotx");
But I always get an unhandled COMException
, telling me the file might be damaged. I tried doc
, docx
and dotx
and I am sure the file exists, because I check it before. When I open the file in Word, it opens fine.