none
Run-Time Error 429 Activex Component Can't Create Object RRS feed

  • Question

  • I have an excel sheet that works just fine on all but 2 computers, they all have office 2016 installed. When I try to use the automation of an email from excel I get the run-time error 429, activex component can't create object. the debug lands on the createobject("outlook.application") part of my code. There is a lot of information on this error and I have tried many things to no avail. Here is my code, can anyone help?

    Sub Email_All_Options()
    Dim rng As Range
    Dim OutApp As Object
    Dim OutMail As Object
    Dim Signature As String
    Dim MyNote As String
        
    If Sheets("Closing Costs").Range("C80").Value > 0 Or Sheets("Closing Costs").Range("D80").Value > 0 Or Sheets("Closing Costs").Range("E80").Value > 0 Then
    MyNote = "There is a DISCOUNT POINT listed, are you ok with that?"
    Answer = MsgBox(MyNote, vbCritical + vbYesNo, "Ratios Check")
        If Answer = vbNo Then
            Exit Sub
        End If
        End If
    Set rng = Nothing
    ' Only send the visible cells in the selection.
    
    Set rng = Sheets("Closing Costs").Range("B56:E84")
    
    
    If rng Is Nothing Then
        MsgBox "The selection is not a range or the sheet is protected. " & _
               vbNewLine & "Please correct and try again.", vbOKOnly
        Exit Sub
    End If
    
    With Application
        .EnableEvents = False
        .ScreenUpdating = False
    End With
    
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)
    With OutMail
       .Display
    End With
    Signature = OutMail.HTMLBody
    StrBody = "Thank you for trusting me with your home financing; as discussed here are your Loan options, please call me to discuss. "
    
    With OutMail
        .Subject = "loanDepot Mortgage Options for " & Worksheets("Main").Range("F5").Value
        .HTMLBody = "<BODY style=font-size:12.5pt;font-family:Calibri>" & "</p>" & StrBody & RangetoHTML(rng) & Signature
        .Display
    End With
    
    On Error GoTo 0
    
    With Application
        .EnableEvents = True
        .ScreenUpdating = True
    End With
    
    Set OutMail = Nothing
    Set OutApp = Nothing
    End Sub


    MEC

    Tuesday, October 23, 2018 11:22 PM

Answers

  • Hi mecerrato,

    Did you solve the problem?

    Best Regards,

    Bruce


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.


    Tuesday, October 30, 2018 2:23 AM
    Moderator

All replies

  • Hi mecerrato,

    Base on my test, this piece of code works fine on my machine. The environment of my machine is Windows10 + Office2016. 

    Does your machine which has error code has different environment as other machines?

    Does it give errors after Microsoft.net Framework is installed?

    If the Microsoft.net Framework is installed, you may need to register the DLL manually. 

    Please see the link below:

    error 429 cannot create activex component
    Run-time ActiveX error 429; ActiveX component can’t create object
    How do I resolve “Run-time error '429': ActiveX component can't create object”?

    Best Regards,

    Bruce


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.

    Wednesday, October 24, 2018 9:04 AM
    Moderator
  • I have the same environment on all machines, the code works perfectly on 8 out of 10 machines and they all have windows 10 and office 2016, they are all full MSI installations. This is so odd. I tried all of those articles, I tried installing the VB6 service pack and many other things but still no luck.

    MEC

    Wednesday, October 24, 2018 7:10 PM
  • Hi mecerrato,

    Did you solve the problem?

    Best Regards,

    Bruce


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.


    Tuesday, October 30, 2018 2:23 AM
    Moderator
  • I was able to uncover the culprit of this issue and it had nothing to do with any of the recommended remedies. It was the antivirus policy that was blocking the macro script, not sure why yet and haven't been able to fix it permanently but a work around was to move the file to the c:\scripts folder that is excluded from the antivirus policy and it now runs perfectly. I am waiting on our corporate IT to figure the antivirus part out because I don't have access to investigate. I was able to find this through the windows event viewer that is where I saw that the macro script was being blocked. Hope this helps other folks that are on that same wild goose chase I was on.


    MEC

    Tuesday, October 30, 2018 12:21 PM