Excel VBA Office 2019 Class not Registered Run time Error 2147721164 (80040154)

Anonymous
2021-07-19T23:50:57+00:00

Hi

I have a macro that used to run fine and now gives me the error message as shown below

I need to open up outlook and then loop through a database to send a customized emails to each person

I created a brand new spreadsheet so there is nothing in it except the macro

it blows up and gives me the error message on the line

Set Testmail_object = CreateObject("Outlook.Application")

I have googled this and no one seems to address the problem

Thank you!

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
{count} votes

11 answers

Sort by: Most helpful
  1. Anonymous
    2021-07-20T08:34:47+00:00

    Hi, I'm Elise, an Independent Advisor and I'd be happy to help with your issue.

    In the VBA editor can you go to Tool > References and then check that the Outlook Object Library has been checked?

    Kind Regards,

    Elise

    0 comments No comments
  2. Anonymous
    2021-07-20T15:00:19+00:00

    Thanks for the suggestion.

    It was not checked, but after I checked it, it still did not run

    Could it be an outlook problem?

    R

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2021-07-20T15:46:05+00:00

    The other common reason for this is if you have two version of office installed. Eg. 2013 and 2016 editions?

    Do you know if this is the case on your device?

    Kind Regards,

    Elise

    0 comments No comments
  4. Anonymous
    2021-07-20T16:36:12+00:00

    Thanks for the response

    I still have office 2007 installed (but for long time it worked fine with that)

    I used to have some Office 2016 but think it is all gone.

    On the start menu I do have

    Office 2016 Tools

    • database compare
    • office upload center
    • spreadsheet compare

    see below for list of installed Microsoft programs

    Thanks for the assistance

    0 comments No comments
  5. Anonymous
    2021-07-20T17:44:55+00:00

    Thank you all for the assistance.

    I upgraded to Outlook 2019, and it now seems to work.

    Not sure why the error appeared in the first place or why it went away, but now works

    Regardless

    a) shame on microsoft for making such cryptic errors

    b) THANK YOU to everyone that tried to help

    0 comments No comments