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 Wanet Telecoms Ltd 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.

MDJ52

MIS
Mar 30, 2001
120
US
I am running Access 2000 along with Office 2003 for all other office modules.
I have just rebuilt my machine, loading office 2003 basic 1st and then Access 2000.
I wrote a module to create an email from information in Access databases. This code has worked fine on a number of other systems with the same configuration. It worked fine on mine until I rebuilt the system. By the way it is XP Pro.
Here is the code:

Function CreateEmail() As Variant
Dim mydb As DAO.Database
Dim my1 As DAO.Recordset
Dim emailhold As String
Dim emailcc As String
Dim errhold As String
Dim Subject As Variant
Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Object
Dim objOutlookRecip As Object
Dim objOutlookAttach As Object
Dim rfqhold As String
Dim delayend As Double
Dim messageh As String
Set mydb = CurrentDb
Set my1 = mydb.OpenRecordset("custrfq_sel_email")

'Create the outlook session
Set objOutlook = CreateObject("Outlook.Application")
'Create the message
Set objOutlookMsg = objOutlook.CreateItem(0)

When I get to the createobject statement I get the error:
Runtime error 429
Activex component can't create object.

I have search Microsoft and the forums, but find nothing with this conbination for a configuration.
Any help would be appreciated

 

You do reference DAO 3.6 library?

And why you Dim objOutlook As Outlook.Application instead of
Dim objOutlook As Oject like the rest of the Outlook's objects?

And forum705 would be most suitable for this post.
 
References within the code are:
VB for Applications
Access 9.0
Outlook 11.0
OLE Automation
DAO 3.6
Forms 2.0
Scripting Runtime
ActiveX Dataobjects 2.5

The outlook.application was just another attempt. I did have it originally as an OBJECT. That did no work either.

Per you recommendation I did post it over in Forum 705 also
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top