SendUsing"configuration value is invalid

J

jpalm

Ron I don't use Outlook, does that make a difference see code below?

Private Sub CommandButton1_Click()
Dim iMsg As Object
Dim iConf As Object
Dim cell As Range
' Dim Flds As Variant

Application.ScreenUpdating = False

' Set iConf = CreateObject("CDO.Configuration")
' iConf.Load -1 ' CDO Source Defaults
' Set Flds = iConf.Fields
' With Flds
'
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
"smtp.mail.lycos.com"
'
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport"
= 25
' .Update
' End With

For Each cell I
Sheets("Sheet1").Columns("B").Cells.SpecialCells(xlCellTypeConstants)
If cell.Offset(0, 1).Value <> "" Then
If cell.Value Like "*@*" And cell.Offset(0, 1).Value
"yes" Then
Set iMsg = CreateObject("CDO.Message")
With iMsg
Set .Configuration = iConf
.To = cell.Value
.From = """Joe"" <[email protected]>"
.Subject = "Reminder"
.TextBody = "Dear " & cell.Offset(0, -1).Value
vbNewLine & vbNewLine & _
"This e-mail is to remind you of you
chiropratic appointment"
.Send
End With

Set iMsg = Nothing
End If
End If
Next cell
Set iConf = Nothing
Application.ScreenUpdating = True
End Su
 
R

Ron de Bruin

Hi

You must use all the commented blue lines in the code examples on my site.
If you have setup a account in Outlook Express you don't have to use the
commented lines.
 

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