Outlook Interop Exception

后端 未结 10 1315
故里飘歌
故里飘歌 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:11

    I ran into the exact same error message you have, my problem was I had installed Office 2016 x64 while the app that was trying to call into it was compiled as x86. Switching to x86 Office 2016 solved the issue for me.

    0 讨论(0)
  • 2021-01-25 08:15

    I had this problem too. I use Mobisynapse desktop app to update my Android Calendar and contacts. Using Office 2010 I decided to upgrade to Office 2016. After seeing it was a Office 365 product I uninstalled it. This caused the Registry to change the Office 2010 Primary Interop Assemblies to change from 32 bit to 64 bit. The Mobisynapse MB4Outlook started reporting sync error "Sync Failed". Mobisynapse – Moffice error 3/31/19 Sync Failed – there is a problem with outlook – on the desktop When I click on Auto Sync settings I get “Please update MB4Outlook add-in first” From where it is installed with your app.

    Solution to this problem occurs when you try an Office365 product that is 64bit and have a 32 bit of office 2007-2013 installed. Step 1: uninstall Office xxxx primary interop assemblies. If the package is not found download from here. https://www.microsoft.com/en-US/Download/confirmation.aspx?id=3508 Install it. Step 2: run Office xxxx Install and select repair. Step 3: Reboot and it should fix the problem.

    0 讨论(0)
  • 2021-01-25 08:16

    have you tried this?

    Microsoft.Office.Interop.Outlook.Application myApp = new Microsoft.Office.Interop.Outlook.Application();
    Microsoft.Office.Interop.Outlook.NameSpace mapiNameSpace = myApp.GetNamespace("MAPI");
    
    0 讨论(0)
  • 2021-01-25 08:19

    This exception usually happens when you had two versions of Office installed and then uninstalled one. Run a repair installation for your still installed Office, this should fix the registry keys.

    0 讨论(0)
提交回复
热议问题