Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Send e-mail with CDO

Hi! I have a macro in excel that was working to send e-mail. But when i
upgraded the office from 2002 to office 2003, the code stop working. On the
instruction: Config.Fields.Update i got the error: "Fields update failed. For
further information, examine the Status property of individual field objects.
" Err: 3749 Status: 262155 (Field Sendusing) Anybody knows if i have to
update any component? Apparently, there is some problem with the method
cdoSendUsingExchange. If i change to cdoSendUsingPickup or cdoSendUsingPort
the error will not work. But i have to send through exchange. Thanks in
advance.

Const cdoSendUsingMethod =
"http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoMailBox = "http://schemas.microsoft.com/cdo/configuration/mailboxurl"
sMailboxURL = "http://servidor/exchange/XXXXXX/Caixa%20de%20saĆ*da/"

' Create message and configuration objects.
Set Msg = CreateObject("CDO.Message")
Set Config = CreateObject("CDO.Configuration")
' Get the message configuration object.
Set Config = Msg.Configuration
' Set the sendusing field to 'cdoSendUsingExchange'.
Config(cdoSendUsingMethod) = 3
' Set the mailboxurl field to the specified mailbox URL.
Config(cdoMailBox) = sMailboxURL
' Update the fields.
Config.Fields.Update
' Set the To, From, Subject, and TextBody fields on the message.
Msg.To = pstrDestinatario
Msg.FROM = "
Msg.Subject = pstrAssunto
Msg.HTMLBody = pstrMensagemHtml
Msg.Send
Reply
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 an e-mail Pa Maher Excel Discussion (Misc queries) 1 September 16th 07 04:27 PM
Send e-mail Andrea Excel Discussion (Misc queries) 3 March 25th 07 12:37 PM
Send FORM by mail Fede Querio Excel Programming 5 July 28th 03 10:50 PM
Send Mail janet Excel Programming 2 July 22nd 03 10:06 PM


All times are GMT +1. The time now is 01:59 PM.

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"