The type 'Microso…

xiaoxiao2021-02-28  72

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

转载请注明原文地址: https://www.6miu.com/read-31002.html

最新回复(0)