ActiveX Component Cant Create Object Run-time 429 Error

Anonymous
2022-02-22T14:48:47+00:00

A few days ago I started to receive this error when I ran this macro. I tried making Active X automatic, I tried re registering DLLs...I did a clean install on O365 STILL nothing. I have an existing file which has code that interacts with the Outlook.Application object. When I paste this code in there, it works. When I create a new workbook or use the existing file which the file resides in. This does not work. I haven't have the slightest clue why it works in one of my files but not this one. I really need this code to work but have ran out of options. Please help

Sub MailURL()

Dim OutApp As Object 

Dim OutMail As Object 

Dim strbody As String 

Set OutApp = CreateObject("Outlook.Application") 

Set OutMail = OutApp.CreateItem(0) 

strbody = "Hello," & "<br>" \_ 

          & "A new visit file has been posted.  Please click" & "<A href='J:\Visit Reports Combined.xlsm'" & "> here </A>" & "to view the file." \_ 

          & "<br>" & "Wieslaw" 

On Error Resume Next 

With OutMail 

    .to = " " 

    .Subject = "Daily Visit File Link" 

    .cc = "" 

    .HTMLBody = strbody 

    .Send 

End With 

On Error GoTo 0 

Set OutMail = Nothing 

Set OutApp = Nothing 

End Sub

Microsoft 365 and Office | Excel | For business | 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
Answer accepted by question author
  1. Anonymous
    2022-02-23T11:45:16+00:00

    OssieMac,

    Thank you for your response. After I posted this message I contacted one of our IT users that was familiar with VBA...He ran it and noticed a security issue on our back end. Our security measures were preventing the interaction with the Microsoft Outlook object. So it was nothing to do with excel or VBA. Thank you so much. And I do apologize for wasting your time and the communities.

    2 people found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. OssieMac 47,981 Reputation points Volunteer Moderator
    2022-02-23T03:24:11+00:00

    Your code runs perfectly for me under test. Suggest that you have a read of the info in the following link.

    https://appuals.com/how-to-fix-runtime-error-429-on-windows-10-and-earlier-versions/ 

    I didn't find any problems at thelink but it is not a Microsoft link so take care if clicking any links in the page.

    I have at times found that strange and unexpected behavious is fixed with a simple ReStart of the computer. (That is RESTART and not just shut down and start up because Restart actually does more than the shut down as far as restoring the computer to its proper defaults)

    2 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. OssieMac 47,981 Reputation points Volunteer Moderator
    2022-02-23T20:42:29+00:00

    @WieH,

    Thankyou for posting back with your solution. I have marked your reply as an answer for the benefit of others who might experience a similar problem.

    0 comments No comments