The type 'Microsoft.Office.Interop.Excel.ApplicationClass' has no constructors defined

The type 'Microsoft.Office.Interop.Excel.ApplicationClass' has no constructors defined

Interop type 'Microsoft.Office.Interop.Excel.ApplicationClass' cannot be embedded. Use the applicable interface instead.

---Solution---

Disable embedding of Interop types for this assembly (References -> Microsoft.Office.Interop.Outlook (right click) -> Properties -> Set 'Embed Interop Types' to False)

 

More info on the why can be found here: http://blogs.msdn.com/b/mshneer/archive/2009/12/07/interop-type-xxx-cannot-be-embedded-use-the-applicable-interface-instead.aspx

posted @ 2013-01-15 15:36  Vincent.Dr  阅读(1560)  评论(0编辑  收藏  举报