CDO Error Message

S

SHIPP

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?
 
S

SHIPP

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top