Hi, I have a small project on MS Access
It uses the CDO library to send e-mails
The code works until yesterday.
But since yesterday it began to show an error (800CCE05 The requested body part was not found in this message)
I'm trying to use CDO on win7, win8 and win10 do not work, but the same code on winxp works without errors.
Dim iCfg As Object
Dim iMsg As New CDO.Message
Set iCfg = CreateObject("CDO.Configuration")
With iCfg.Fields
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.server.com"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "MyUserName"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "MyPassordNot"
.Item("http://schemas.microsoft.com/cdo/configuration/sendemailaddress") = "******@server.com"
.Update
End With
'Set iMsg = CreateObject("CDO.Message")
With iMsg
.Configuration = iCfg
.Subject = "Subject" <=== Show Error
.To = "******@address.com"
.TextBody = "MessageBody"
.AddAttachment "FullPathToAttachment"
.Send
End With
Set iMsg = Nothing
Set iCfg = Nothing