Outlook Interop Exception

后端 未结 10 1318
故里飘歌
故里飘歌 2021-01-25 07:49

Trying to automate Outlook as

Microsoft.Office.Interop.Outlook.Application myApp = new Microsoft.Office.Interop.Outlook.ApplicationClass();    
Microsoft.Office         


        
10条回答
  •  遥遥无期
    2021-01-25 08:00

    I've been stumped by this problem for days. This worked for me:

    I just realized that Outlook 2013 is 64 bit... And my C# app had in Project Properties -> Build "Any CPU" as platform target and a check-mark in "Prefer 32-bit".

    I changed the Platform target to x64 and it worked!

提交回复
热议问题