none
Error 429 activex component can't create object RRS feed

  • Question

  • Hi

    In Access when I use;

    Set OutlookApp = CreateObject("Outlook.Application")

    I get below error. How can I fix it?

    Thanks

    Regards


    Thursday, September 29, 2016 1:41 AM

Answers

  • Dirk is right (of course!) regarding using GetObject().  You should use code similar to

        Dim oOutlook          As Object
     
        On Error Resume Next
        Set oOutlook = GetObject(, "Outlook.Application")    'Bind to existing instance of Outlook
        If Err.Number <> 0 Then    'Could not get instance of Outlook, so create a new one
            Err.Clear
            Set oOutlook = CreateObject("Outlook.Application")
        End If
        On Error GoTo Error_Handler


    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net




    Friday, September 30, 2016 12:01 AM

All replies

  • Hi,

    It might cause from:

    Data Access Objects (DAO) is not properly registered.

    One or more references are missing.

    There is a utility database reference that is not valid.

    You do not have the required permissions for required libraries.

    There is a damaged wizard file.

     

    Please visit this KB: You receive a "ActiveX component can't create object" error message when using Access

    You could try the solutions mentioned in the KB above.

    Thursday, September 29, 2016 4:12 AM
    Moderator
  • I don't know all the details, but in certain situations CreateObject with Outlook fails.  I tried registering this library and that one...  after fighting with various systems for quite some time I gave up and decided to do things differently.  Long story short, you could try the solution I propose in http://www.devhut.net/2014/10/31/createobjectoutlook-application-does-not-work-now-what/ .

    I do hope it helps.


    Daniel Pineault, 2010-2015 Microsoft MVP Professional Support: http://www.cardaconsultants.com MS Access Tips and Code Samples: http://www.devhut.net

    Thursday, September 29, 2016 12:46 PM
  • If you are using the free version of Outlook (Outlook Express) you cannot create the object because the .EXE application file dosen't exist for that version. I found out the hard way too. I think you need to purchase and install the commercial version of Outlook.
    Thursday, September 29, 2016 1:06 PM
  • Thanks for the information Lawrence, I was not aware of this fact.

    In the specific case I had to create the above workaround was in a corporate environment with fully licensed Office Pro, ...  everything was above board and fully licensed.  I have since had several e-mails regarding my code where others have experienced the same issue.  I simply don't have the time to do the necessary digging to find the true root cause of the problem (in my case) and the workaround has been, knock on wood, 100% reliable to date (2+ years in now).


    Daniel Pineault, 2010-2015 Microsoft MVP Professional Support: http://www.cardaconsultants.com MS Access Tips and Code Samples: http://www.devhut.net


    Thursday, September 29, 2016 4:01 PM
  • If you are using the free version of Outlook (Outlook Express) you cannot create the object because the .EXE application file dosen't exist for that version. I found out the hard way too. I think you need to purchase and install the commercial version of Outlook.

    Note: Outlook Express is not a free version of Outlook; it's an entirely different program that doesn't support automation.

    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Thursday, September 29, 2016 7:18 PM
  • The first question to ask is, is Outlook installed on the computer?  If it isn't, you obviously can't create an instance of it.

    If it is installed, then you should probably check to see if it's running and use GetObject rather than CreateObject if it is.


    Dirk Goldgar, MS Access MVP
    Access tips: www.datagnostics.com/tips.html

    Thursday, September 29, 2016 7:28 PM
  • Dirk is right (of course!) regarding using GetObject().  You should use code similar to

        Dim oOutlook          As Object
     
        On Error Resume Next
        Set oOutlook = GetObject(, "Outlook.Application")    'Bind to existing instance of Outlook
        If Err.Number <> 0 Then    'Could not get instance of Outlook, so create a new one
            Err.Clear
            Set oOutlook = CreateObject("Outlook.Application")
        End If
        On Error GoTo Error_Handler


    Daniel Pineault, 2010-2016 Microsoft MVP
    Professional Support: http://www.cardaconsultants.com
    MS Access Tips and Code Samples: http://www.devhut.net




    Friday, September 30, 2016 12:01 AM