Share via

VBA : ActiveX component can't create object

Anonymous
2023-12-08T10:29:37+00:00

I installed Outlook ( Version see pic) from Microsoft Store.

I want to access Outlook fromp VBA, but It gives me an error (See pic): ActiveX component can't create object

(This line : Set objOL = CreateObject("outlook.Application")).

I didn't find Reference Micosoft Outlook 16 object in VBA so I tried late binding:

Dim objOL As Object Set objOL = CreateObject("outlook.Application")

If you have any idea, Please help me.

Thank you so much,

Rachid

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2023-12-08T19:29:28+00:00

    Hi Ajibola Olanipekun, Thank you so much for your time.

    In Regedit, No Key HKEY_CLASSES_ROOT\Outlook.Application

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-12-08T22:56:06+00:00

    Hello,

    The registry key HKEY_CLASSES_ROOT\Outlook.Application is used to store information about the Outlook application, such as the version, the CLSID, and the ProgIDl. If this key is missing or incomplete, it may cause problems with the Outlook object model, such as creating an instance of Outlook using code.

    To fix this issue, you can try the following methods:

    • Run a repair of Microsoft Office. This may restore the missing or corrupted registry keys.

    • Export the HKEY_CLASSES_ROOT\Outlook.Application key from another computer that has the same version of Outlook installed and import it to your computer.

    If you have any further questions or need additional assistance, please feel free to ask. I'm here to help!

    Give back to the Community. Help the next person with this issue by indicating if this reply solved your problem. Click Yes or No below.

    Kind regards.

    Ajibola.

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2023-12-08T11:11:36+00:00

    Greetings! I am Ajibola, eager to assist you with confidence and assertiveness. I guarantee to provide you with exceptional support.

    Check the registry settings of your Outlook application. Sometimes, the Outlook application may not be registered correctly in the registry, which may cause the ActiveX component can't create an object error. To fix this, you can do the following steps:

    • Open the Run dialogue box by pressing the Windows + R keys on your keyboard.

    • Type regedit and click OK to open the Registry Editor.

    • Navigate to the following key: HKEY_CLASSES_ROOT\Outlook.Application

    • Right-click on the key and select Permissions.

    • Make sure that your user account has Full Control permission for the key. If not, click on Add and enter your user name, then check the Full Control box.

    • Click OK to save the changes and exit the dialogue box.

    • Restart your computer and try to run your VBA code again.

    Another possible solution is to reinstall the Outlook application from the Microsoft Store. Sometimes, the Outlook application may not be installed properly or may be corrupted, which may cause the ActiveX component can't create an object error.

    'Note: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.'

    https://stackoverflow.com/questions/30841320/activex-component-cant-create-object-for-outlook-vba

    If you have any further questions or need additional assistance, please feel free to ask. I'm here to help!

    Give back to the Community. Help the next person with this issue by indicating if this reply solved your problem. Click Yes or No below.

    Kind regards.

    Ajibola.

    1 person found this answer helpful.
    0 comments No comments