P
Philip Morgan
I am trying to send a CDONTS email from an Access page using the code
provided below. The code works fine from a server ASP page (hence, we
have the necessary ActiveX and other add-in's).
The following error pops up when the code is launched:
"Run-time error '429'"
"ActiveX component can't create object"
and highlights the "User.Send" line in the code.
'******* CODE START *******
Option Compare Database
Option Explicit
Dim userMail
Private Sub cmdEmailTest_Click()
Set userMail = CreateObject("CDONTS.NewMail")
userMail.To = "(e-mail address removed)"
userMail.From = "(e-mail address removed)"
userMail.Subject = "test"
userMail.Body = "test"
userMail.Send
Set userMail = Nothing
End Sub
'******* CODE END *******
Others have posted solution code with "Server" prefixing the
"CreateObject" (for ASP pages).This results in a "Variable Not Found"
error on the "server".
I have also tried relocating the Access .mdb file from my C:/drive, to
a mapped server.
Any assistance would be greatly appreciated.
Thanks!
Phil Morgan
provided below. The code works fine from a server ASP page (hence, we
have the necessary ActiveX and other add-in's).
The following error pops up when the code is launched:
"Run-time error '429'"
"ActiveX component can't create object"
and highlights the "User.Send" line in the code.
'******* CODE START *******
Option Compare Database
Option Explicit
Dim userMail
Private Sub cmdEmailTest_Click()
Set userMail = CreateObject("CDONTS.NewMail")
userMail.To = "(e-mail address removed)"
userMail.From = "(e-mail address removed)"
userMail.Subject = "test"
userMail.Body = "test"
userMail.Send
Set userMail = Nothing
End Sub
'******* CODE END *******
Others have posted solution code with "Server" prefixing the
"CreateObject" (for ASP pages).This results in a "Variable Not Found"
error on the "server".
I have also tried relocating the Access .mdb file from my C:/drive, to
a mapped server.
Any assistance would be greatly appreciated.
Thanks!
Phil Morgan