Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX Component Can't Create Object

Status
Not open for further replies.

hsp7777

Programmer
Jan 11, 2005
67
US
Greetings,

I am using the following code and trying to send an attachment from Access 2000. The code works fine if I have Outlook open. If Outlook is closed, however, then I recieve the following error message: "Error in SendOutlookMessage (1):429 - ActiveX component can't create object".

Sub Test()
...
Set objApp = GetObject(, "Outlook.Application")

If objApp Is Nothing Then
'// (Error message occurs on this line).
Set objApp = CreateObject("Outlook.Application")
...
End If

End Sub

I have done the following:

1) Registered any DAO objects.
2) Made sure that no references are missing.
3) Made sure that any utility databases have valid references.
4) I have renamed any Access wizards (in case they were corrupt) and have reinstalled Access.

Unfortunately, the error still persists unless I have Outlook open. Any ideas as to what else I can try?

Thanks in advance!
 
How is your Outlook instance declared ?

Dim objApp as .... ?

Rgds, Geoff

A file that big? It might be very useful. But now it is gone

Please read FAQ222-2244 before you ask a question
 
It is declared as the following:

Dim objApp As Outlook.Application

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top