R
robotman
I'm trying to send a simple email from excel. No attachments. I
downloaded this script using CDO (???), but when it goes to send the
email (at .send) , I get the following error:
--> The "SendUsing" configuration is invalid. <---
Can anyone help?!
Thanks.
John
___
Sub Mail_Small_Text()
Dim iMsg As Object
Dim iConf As Object
Dim strbody As String
' Dim Flds As Variant
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
strbody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4"
With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.CC = ""
.BCC = ""
.From = """Joe Smith"" <[email protected]>"
.Subject = "Important message"
.TextBody = strbody
.Send ' <----GETS ERROR HERE
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub
downloaded this script using CDO (???), but when it goes to send the
email (at .send) , I get the following error:
--> The "SendUsing" configuration is invalid. <---
Can anyone help?!
Thanks.
John
___
Sub Mail_Small_Text()
Dim iMsg As Object
Dim iConf As Object
Dim strbody As String
' Dim Flds As Variant
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
strbody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4"
With iMsg
Set .Configuration = iConf
.To = "(e-mail address removed)"
.CC = ""
.BCC = ""
.From = """Joe Smith"" <[email protected]>"
.Subject = "Important message"
.TextBody = strbody
.Send ' <----GETS ERROR HERE
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub