LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Error send mail with CDO

Hy:

When i try to send email with this code i get a error "the message could not be sent to the smtp server"
Run-time error 2147220975 (80040211) The transport error code was 0x80040217
Software in use Microsoft Excel 2003 and windows xp.

Windows 2000 and office 2000 configuration no problems.

Thanks
Paulo



Private Sub EnvEmailControl()


Dim iMsg As Object
Dim iConf As Object
Dim WB As Workbook
Dim WBname As String

Application.ScreenUpdating = False
Set WB = ActiveWorkbook
WBname = WB.Name
WB.SaveCopyAs "C:\" & WBname
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
With iMsg
Set .Configuration = iConf
.To = "
.From = """Anyone"" <xxxx"
.Subject = Range("L3").Value
.TextBody = "book"
.AddAttachment "C:\" & WBname
.Send ' error on this comand

End With
Set iMsg = Nothing
Set iConf = Nothing
Set WB = Nothing
Application.ScreenUpdating = False


End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bypass: A program is trying to send mail using Item.Send prompt Vick Excel Discussion (Misc queries) 1 June 25th 09 03:31 AM
Send to mail recipient error JohnB Excel Discussion (Misc queries) 3 August 11th 07 11:32 AM
Error when using Send to Mail recipient ChuckW Excel Discussion (Misc queries) 1 August 24th 05 08:24 PM
Send e-mail with CDO Luciano Excel Programming 0 January 12th 05 09:15 AM
Send Mail janet Excel Programming 2 July 22nd 03 10:06 PM


All times are GMT +1. The time now is 10:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"