07-29-2009, 09:50 AM
Join Date: Jul 2009
VBA - send email using CDO and Exchange
I have a problem with sending emails from VBA through remote Exchange server (in LAN). Previously I used remote SMTP server and everything was working fine, but now I changed few parameters to use Exchange instead and I'm facing the problem.
Here is my code (completely based on Microsoft refernence pages):
Dim Msg, Config
Set Msg = CreateObject("CDO.Message")
Set Config = CreateObject("CDO.Configuration")
Set Config = Msg.Configuration
Config("http://schemas.microsoft.com/cdo/configuration/sendusing") = 3
Config("http://schemas.microsoft.com/cdo/configuration/mailboxurl") = sMailboxURL
Msg.To = sTo
Msg.From = sFrom
Msg.Subject = sSubject
Msg.TextBody = sText
Set Msg = Nothing
Set Config = Nothing
The error occurs on line "Config.Fields.Update
Description: Fields update failed. For further information, examine the Status property of individual field objects
Status of field 'Sendusing' = 262155
Does anyone know what is the problem? I can't find better detail of the error. Also I tried to use several forms in mailbox address but the result is still the same.
I would appreciate any help or hint.