Discussion:
Run-time Error '429'; ActiveX component can't create object
(too old to reply)
muyBN
2006-07-26 19:52:02 UTC
Permalink
I get the above message upon running the following code. I tried the
suggestions in the Help issue and I have set the references in the VBE.


Dim blnStarted As Boolean, objOutlookApp As Outlook.Application, objItem As
Outlook.MailItem
~~
Set objOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set objOutlookApp = CreateObject("Outlook.Application")
blnStarted = True
End If
Set objItem = objOutlookApp.CreateItem(olMailItem)
With objItem
.To = strEmail
.Subject = strSubject
.Body = strBody
.Display
End With
Set objItem = Nothing
Set objOutlookApp = Nothing
--
Bryan
Jezebel
2006-07-26 23:34:29 UTC
Permalink
Which line gives the error?
Post by muyBN
I get the above message upon running the following code. I tried the
suggestions in the Help issue and I have set the references in the VBE.
Dim blnStarted As Boolean, objOutlookApp As Outlook.Application, objItem As
Outlook.MailItem
~~
Set objOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set objOutlookApp = CreateObject("Outlook.Application")
blnStarted = True
End If
Set objItem = objOutlookApp.CreateItem(olMailItem)
With objItem
.To = strEmail
.Subject = strSubject
.Body = strBody
.Display
End With
Set objItem = Nothing
Set objOutlookApp = Nothing
--
Bryan
muyBN
2006-07-27 00:40:02 UTC
Permalink
Thanks for your response. The line with GetObject is the one that throws the
error.

Actually, I had a similar problem that I posted as an issue in the Outlook
forum. The person there suggested that I put "On Error Resume Next" before
the GetObject line and "On Error GoTo 0" after it. At first, that suggestion
didn't make sense to me but after I did it and resolved the problem, it
started making more sense: If the application isn't running, you can't "get"
it. If it's not running, it throws an error and you have to create it.
--
Bryan
Post by Jezebel
Which line gives the error?
Post by muyBN
I get the above message upon running the following code. I tried the
suggestions in the Help issue and I have set the references in the VBE.
Dim blnStarted As Boolean, objOutlookApp As Outlook.Application, objItem As
Outlook.MailItem
~~
Set objOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set objOutlookApp = CreateObject("Outlook.Application")
blnStarted = True
End If
Set objItem = objOutlookApp.CreateItem(olMailItem)
With objItem
.To = strEmail
.Subject = strSubject
.Body = strBody
.Display
End With
Set objItem = Nothing
Set objOutlookApp = Nothing
--
Bryan
Loading...