#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro email

I'm getting an error when I am using this macro:


Sub AA_CDO()
Dim iMsg As Object
Dim iConf As Object
' Dim Flds As Variant
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
' iConf.Load -1 ' CDO Source Defaults
' Set Flds = iConf.Fields
' With Flds
'
..Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"
'
..Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
' .Update
' End With
With iMsg
Set .Configuration = iConf
.To = ; "
.CC = "
.BCC = ""
.From = """Excel"" "
.Subject = "Important message"
.TextBody = "AA has reached its stop loss" & vbNewLine & vbNewLine & _
"Please review this position immediately."
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub

Any thoughts?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Macro email

Have you read all information on my site ??
http://www.rondebruin.nl/cdo.htm

I see that you not use the commented lines and i see a strange name for the SMTP server


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Macro not running as intended" om wrote in message
...
I'm getting an error when I am using this macro:


Sub AA_CDO()
Dim iMsg As Object
Dim iConf As Object
' Dim Flds As Variant
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
' iConf.Load -1 ' CDO Source Defaults
' Set Flds = iConf.Fields
' With Flds
'
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"
'
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
' .Update
' End With
With iMsg
Set .Configuration = iConf
.To = ; "
.CC = "
.BCC = ""
.From = """Excel"" "
.Subject = "Important message"
.TextBody = "AA has reached its stop loss" & vbNewLine & vbNewLine & _
"Please review this position immediately."
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub

Any thoughts?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro email

That is my smtp according to outlook...I did read your site and I'm trying to
get around the constant message approval. We have outlook and I'm not sure
exactly what year of windows. I thought I understood most everything on the
site, but maybe not.

"Ron de Bruin" wrote:

Have you read all information on my site ??
http://www.rondebruin.nl/cdo.htm

I see that you not use the commented lines and i see a strange name for the SMTP server


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Macro not running as intended" om wrote in message
...
I'm getting an error when I am using this macro:


Sub AA_CDO()
Dim iMsg As Object
Dim iConf As Object
' Dim Flds As Variant
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
' iConf.Load -1 ' CDO Source Defaults
' Set Flds = iConf.Fields
' With Flds
'
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"
'
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
' .Update
' End With
With iMsg
Set .Configuration = iConf
.To = ; "
.CC = "
.BCC = ""
.From = """Excel"" "
.Subject = "Important message"
.TextBody = "AA has reached its stop loss" & vbNewLine & vbNewLine & _
"Please review this position immediately."
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub

Any thoughts?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Macro email

By commented lines do you mean the additional lines you have listed? Or did
I not change something I needed to?

"Ron de Bruin" wrote:

Have you read all information on my site ??
http://www.rondebruin.nl/cdo.htm

I see that you not use the commented lines and i see a strange name for the SMTP server


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Macro not running as intended" om wrote in message
...
I'm getting an error when I am using this macro:


Sub AA_CDO()
Dim iMsg As Object
Dim iConf As Object
' Dim Flds As Variant
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
' iConf.Load -1 ' CDO Source Defaults
' Set Flds = iConf.Fields
' With Flds
'
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
'
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"
'
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
' .Update
' End With
With iMsg
Set .Configuration = iConf
.To = ; "
.CC = "
.BCC = ""
.From = """Excel"" "
.Subject = "Important message"
.TextBody = "AA has reached its stop loss" & vbNewLine & vbNewLine & _
"Please review this position immediately."
.Send
End With
Set iMsg = Nothing
Set iConf = Nothing
End Sub

Any thoughts?



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
Using Macro how to create email link for the email addresses in aRange or Selection Satish[_2_] Excel Worksheet Functions 8 December 28th 09 03:30 PM
Email Macro help! Ken[_2_] Excel Worksheet Functions 2 January 6th 09 02:42 PM
Excel VBA macro to send email attachment from default email client wifigoo Excel Programming 2 April 12th 08 03:54 PM
How do I create an email macro to auto fill the email? Justin[_4_] Excel Discussion (Misc queries) 0 November 14th 07 10:49 PM
Macro To Email XLS ynissel Excel Discussion (Misc queries) 4 May 26th 05 07:12 PM


All times are GMT +1. The time now is 01:56 AM.

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

About Us

"It's about Microsoft Excel"