|
-
Aug 14th, 2003, 08:58 AM
#1
Thread Starter
Hyperactive Member
Automating Outlook - Error 429 (Activex cannot create object)
Hi,
I have the following code:
VB Code:
Dim olapp As New Outlook.Application
Dim olMail As Outlook.MailItem
Set olMail = olapp.CreateItem(olMailItem)
olMail.To = txtEmail.Text
olMail.Subject = "Blah..."
olMail.send
It works on my machine (with Outlook 2002), but when I install it on the user's PC (with Outlook 2000) I get "Activex cannot create object".
I used P+D wizard to create the setup files, and I checked the MSOUTL.OLB file on the users PC - it has the same attrib. as on my PC.
-
Aug 14th, 2003, 11:02 AM
#2
is it the same versionOLB file?
-
Aug 14th, 2003, 11:28 AM
#3
Addicted Member
Hi,
Try using CDO. Code as below:
Code:
Dim newMail
Set newMail = CreateObject("CDONTS.Newmail")
newMail.To = "[email protected]"
newMail.body = "body message"
newMail.send
set newMail = nothing
It works much faster and also doesn't depend on having Outlook installed. Also, you can send cheeky e-mails from any e-mail addres on your current domain (i.e. [email protected]) by saying newMail.From.
Hope this helps?
DJ
-
Aug 15th, 2003, 01:37 AM
#4
Thread Starter
Hyperactive Member
Thanx for the replies.
Originally posted by kleinma
is it the same versionOLB file?
How do i check the version?
Originally posted by DJ_Catboy
Hi,
Try using CDO. Code as below:
Code:
Dim newMail
Set newMail = CreateObject("CDONTS.Newmail")
newMail.To = "[email protected]"
newMail.body = "body message"
newMail.send
set newMail = nothing
DJ
This still give the "Activex cannot create object" error on newMail.Send.
I selected ref. "MS CDO for NTS 1.2 Library"; "MS CDO for Exchange 2000 Library" and "MS CDO 1.21 Library" on 3 different occasions and on all 3 occasions the pgm failed on newMail.Send.
-
Aug 15th, 2003, 02:28 AM
#5
Addicted Member
Hi,
To be honest, I am not sure. Every time I have wanted to use this it just works! I copied the code in my previous post from a VBScript file that I have on one of my servers that runs an automated task!
Apologies if I cannot be more helpful...
DJ
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|