SendUsing"configuration value is invalid

J

jpalm

Now I'm receiving a Compile error sub or function not defined.

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 In
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 your
chiropratic appointment"
Send
End With

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

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