CDO Error Message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I got the following code from Paul Sadowski's web page.

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = Me.Subject
objMessage.From = "(e-mail address removed)"
objMessage.To = strTo
objMessage.TextBody = strEMsg
objMessage.AddAttachment "c:\temp\readme.txt"
objMessage.Send

When I run it I get the error message variable undefined on the

Set objMessage = CreateObject("CDO.Message")

line. I am using Access 2003. Do I need to set a reference to something? If
so what? Or is there another problem?
 
I put in the following Dim statement:

Dim objMessage as object

Now I get the following error:

The "Send Using" configuration value is invalid.

at the following line of code.

objMessage.Send

Any help would be appreciated.
 
Back
Top