> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MAPI import errors

> Resolve MAPI import errors when integrating ABBYY FlexiCapture with Microsoft Office 365 by creating and configuring a COM+ application for the connector.

Users who choose to integrate ABBYY FlexiCapture with Microsoft Office365 may encounter errors like the following: "Unhandled exception at 0x00007FFAEAB2A839 (KernelBase.dll) in FlexiEx.exe: 0xC06D007E: Module not found (parameters: 0x000000E126EFE040)." The issue can be solved by creating and configuring a COM+ application.

<Warning>
  Before creating a COM+ application:
</Warning>

* Make sure that the ABBYY FlexiCapture services are running under the same user account that is used for the Microsoft Outlook profile. This can be achieved by opening Microsoft Outlook under the required account and adding a mail box from which the program will import documents.
* Make sure that this user account under which the ABBYY FlexiCapture services are running has administrative permissions, because you will use this user account to create your COM+ application.

To create a COM+ application:

1. Open the **Component Services console** and navigate to **Console Root → Computers → My Computer → COM+ Applications**.
2. Right-click **COM+ Applications** and then click **New → Application** on the shortcut menu. The **COM+ Application Install Wizard** will open.

<Frame>
  <img src="https://mintcdn.com/abbyy/XVEmG3cTpHwMKf5X/images/flexi-capture/TG_Integration_MapiImportError_1.png?fit=max&auto=format&n=XVEmG3cTpHwMKf5X&q=85&s=fb5c6490dfe9afc6b6d852b527d76a49" alt="Screenshot of Component Services with COM+ Applications right-clicked and New, Application selected to open the COM+ Application Install Wizard." width="1184" height="597" data-path="images/flexi-capture/TG_Integration_MapiImportError_1.png" />
</Frame>

3. In the **Install or Create a New Application** dialog box, click **Create an empty application**.

<Frame>
  <img src="https://mintcdn.com/abbyy/XVEmG3cTpHwMKf5X/images/flexi-capture/TG_Integration_MapiImportError_2.png?fit=max&auto=format&n=XVEmG3cTpHwMKf5X&q=85&s=a554fb95f8af004f88867b91feba3837" alt="Screenshot of the Install or Create a New Application dialog box with Create an empty application selected." width="513" height="455" data-path="images/flexi-capture/TG_Integration_MapiImportError_2.png" />
</Frame>

4. In the **Create Empty Application** dialog box, enter a name for your application, select **Server application**, and click **Next**.

<Frame>
  <img src="https://mintcdn.com/abbyy/XVEmG3cTpHwMKf5X/images/flexi-capture/TG_Integration_MapiImportError_3.png?fit=max&auto=format&n=XVEmG3cTpHwMKf5X&q=85&s=141406c5c35700169afb2bd2f6db3cb2" alt="Screenshot of the Create Empty Application dialog box with an application name entered and Server application selected." width="513" height="455" data-path="images/flexi-capture/TG_Integration_MapiImportError_3.png" />
</Frame>

5. In the **Set Application Identity** dialog box, select **Interactive user - the current logged on user** and click **Next**.

<Frame>
  <img src="https://mintcdn.com/abbyy/XVEmG3cTpHwMKf5X/images/flexi-capture/TG_Integration_MapiImportError_4.png?fit=max&auto=format&n=XVEmG3cTpHwMKf5X&q=85&s=bdc1ae38f1795d1d0edff99ef9437e9e" alt="Screenshot of the Set Application Identity dialog box with Interactive user, the current logged on user, selected." width="513" height="455" data-path="images/flexi-capture/TG_Integration_MapiImportError_4.png" />
</Frame>

6. In the remaining dialog boxes, simply click **Next**, leaving the default settings. Complete the creation of your COM+ application.

Once you have created your COM+ application, you need to import the required FlexiCapture component:

1. In the list of available applications, locate your newly created COM+ application, right-click the **Components** folder, and then click **New → Component**.

<Frame>
  <img src="https://mintcdn.com/abbyy/XVEmG3cTpHwMKf5X/images/flexi-capture/TG_Integration_MapiImportError_5.png?fit=max&auto=format&n=XVEmG3cTpHwMKf5X&q=85&s=4cff71a7b0c55f7e4bd8accf27500453" alt="Screenshot of Component Services with the new COM+ application's Components folder right-clicked to import a component." width="847" height="594" data-path="images/flexi-capture/TG_Integration_MapiImportError_5.png" />
</Frame>

2. In the **Import or install a component** dialog box, click **Import component(s) that are already registered.**

<Frame>
  <img src="https://mintcdn.com/abbyy/XVEmG3cTpHwMKf5X/images/flexi-capture/TG_Integration_MapiImportError_6.png?fit=max&auto=format&n=XVEmG3cTpHwMKf5X&q=85&s=b7b0d71f150b0f41ef122fb03141379f" alt="Screenshot of the Import or install a component dialog box with the option to import components that are already registered selected." width="513" height="400" data-path="images/flexi-capture/TG_Integration_MapiImportError_6.png" />
</Frame>

3. In the **Choose Components to Import** dialog box:
   * If you are using a 64-bit version of Microsoft Office, select the ABBYYFlexiCapture12.MapiConnectorX64.12 component and click **Next**.
   * If you are using a 32-bit version of Microsoft Office, select the **32-Bit Registry** option, then select the ABBYYFlexiCapture12.MapiConnectorX86.12 component, and click **Next**.
   <Frame>
     <img src="https://mintcdn.com/abbyy/XVEmG3cTpHwMKf5X/images/flexi-capture/TG_Integration_MapiImportError_7.png?fit=max&auto=format&n=XVEmG3cTpHwMKf5X&q=85&s=6a80da47e7d4c939cf2dc875fee072ee" alt="Screenshot of the registry selection with the 32-Bit Registry option chosen for a 32-bit Microsoft Office installation." width="513" height="400" data-path="images/flexi-capture/TG_Integration_MapiImportError_7.png" />
   </Frame>
4. Once you have imported the required component, right-click your COM+ application in the list of available applications and click **Properties** on the shortcut menu. In the application properties dialog box that opens, click the **Pooling & Recycling** tab.
5. In the **Expiration Timeout (minutes)** box, type 60. In the **Activation Limit** box, type 1. Click **OK** to save your changes.

<Frame>
  <img src="https://mintcdn.com/abbyy/XVEmG3cTpHwMKf5X/images/flexi-capture/TG_Integration_MapiImportError_8.png?fit=max&auto=format&n=XVEmG3cTpHwMKf5X&q=85&s=d8cd87c9c093451d8844054709ea9eec" alt="Screenshot of the COM+ application properties with Expiration Timeout set to 60 minutes and Activation Limit set to 1." width="414" height="565" data-path="images/flexi-capture/TG_Integration_MapiImportError_8.png" />
</Frame>

For the new import settings to take effect, you will need to restart the Processing Station.

<Note>
  It is recommended to turn off the Processing Station before configuring MAPI import. If you have not turned off the Processing Station and receive the "The RPC server is unavailable" error while configuring MAPI import, restart ABBYY FlexiCapture and the Processing Stations.
</Note>

<Note>
  We recommend that you use Microsoft Outlook 2016 when importing to ABBYY FlexiCapture 12 using the MAPI protocol. Later versions of Microsoft Outlook are not supported.
</Note>
