Outlook metabot throwing error in select profile

  • 16 December 2022
  • 4 replies


I  am getting below error when outlook metabot trying to select the outlook profile.

[ERROR]:System.Runtime.InteropServices.COMException (0x800401E3): Operation unavailable (Exception from HRESULT: 0x800401E3 (MK_E_UNAVAILABLE))
   at System.Runtime.InteropServices.Marshal.GetActiveObject(Guid& rclsid, IntPtr reserved, Object& ppunk)
   at System.Runtime.InteropServices.Marshal.GetActiveObject(String progID)
   at OutlookWrapper.OutlookWrapper.SelectProfile(String ProfileName, String ProfilePassword)

4 replies

Userlevel 7
Badge +13

Hi @Anuroop SamratS104796 ,


Outlook should not be open or maximized during the BOT execution. Or minimizing the Outlook window will also work in your case. 


Make changes to your code to perform either of the above and try whether it is working for you or not.

Else, there is a new version of the Outlook metabot available on Bot store. Please download it and try.

Userlevel 5
Badge +12

Hi @Anuroop SamratS104796 

Can you kill any existing outlook sessions before the outlook profile code and give a try? 

Userlevel 3
Badge +6

Dear @Anuroop SamratS104796,


It looks like you are encountering an error when trying to use an Outlook metabot in Automation Anywhere to select a profile.

The error message indicates that there was a COMException with the HRESULT value 0x800401E3, which means "MK_E_UNAVAILABLE" or "Operation unavailable". This error can occur for a number of reasons, such as if Outlook is not running or if the requested object is not available.

To troubleshoot this issue, you can try the following steps:

  1. Make sure that Outlook is running on your machine.

  2. Check if the Outlook profile you are trying to select is valid and exists on your machine.

  3. If you are using a password to access the Outlook profile, make sure that it is correct.

  4. Check if there are any other programs or processes running on your machine that might be conflicting with Outlook or the Automation Anywhere metabot.

  5. Try restarting your machine and see if that resolves the issue.

  6. If the problem persists, you can try repairing or re-installing Outlook.

I hope these suggestions help! If you need further assistance, it would be helpful to have more information about your setup and the steps you are taking to reproduce the error.



Badge +1


I am also facing the issue with Metabot in 2 below scenarios.

  1. Win7 - Outlook 2010 : It stopped working because of outlook issue. IT told us that Outlook 2010 is no longer supported in Win 07. So we checked with Latest outlook (exchange) by adding the user profile but it still didn’t work.
    • Initially (when it was working in Win7 - Outlook 2010), I had updated Outlook Trust Center settings to PROGRAMMATIC ACCESS → NEVER WARN ME ABOUT SUSPICIOUS ACTIVITY. Is this setting required for Outlook Exchange
  2. User Created on Exchange : The operations are not working for when user profile is created on Office Exchange. It does not select the profile. 

I have tried with above options but it didnt work.

Please guide.