Hi Ron,
One last note concerning CDO email process. I was using the CDO code noted
in my first email here at work. Up until today, everything worked just fine.
However, when I try to run it today - it does not work. No error, no
message, no nothing.
I was reading online that some others experienced similar problems, but
there was no sound reason for why this occurs. I am working off my work
server and I'm not sure if there are some restrictions of sorts that filter
it out after a certain amount of emails.
Have you run across this problem before? If so, do you know what it is so I
could possibly bring it up to our IT group?
Thanks again - Jenny B.
"Ron de Bruin" wrote:
Hi Jenny
Sorry, I not understand what you want
Can you give a example or send me the file private
--
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
"Jenny B." wrote in message ...
Hi Ron,
I'm a big fan of your CDO procedure that sends emails from Excel avoiding
the security warnings €“ great idea. I'm currently using one of your send
programs and I'm wondering if you could help me to add on last step.
After reviewing your other email macros with added text body, I cant quite
find one that exactly covers the one piece I need to add. I just need one
additional line of code to attach a copy of the €śAccount Mgmt Checklist€ť to
the second group in the program (noted in the routine). These recipients are
already pre-determined by front side by programming. The second part of the
code looks for "Sales" as the determinant for those recipients who would
receive the attachment. The €śSales€ť group would receive a spreadsheet and
message vs. the €śYes€ť group just getting the message.
Any thoughts would be greatly appreciated.
Thanks so much and I really think this CDO process is slick - Jenny B.
Option Explicit
Sub CDO_Personalized_Mail_Body()
Dim iMsg As Object
Dim iConf As Object
Dim cell As Range
Dim Flds As Variant
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Set iConf = CreateObject("CDO.Configuration")
For Each cell In
Sheets("Sheet1").Columns("B").Cells.SpecialCells(x lCellTypeConstants)
If cell.Offset(0, 1).Value < "" Then
If cell.Value Like "?*@?*.?*" And LCase(cell.Offset(0, 1).Value)
= "yes" Then
Set iMsg = CreateObject("CDO.Message")
With iMsg
Set .Configuration = iConf
.To = cell.Value
.From = """Account Mgmt"" "
.Subject = "New Book Entry Checklist" & " - " &
Sheets("Account Mgmt Checklist").Range("F5").Value
.TextBody = "Hello " & cell.Offset(0, -1).Value &
vbNewLine & vbNewLine & _
"Please review the Book Entry Checklist and
forward to the DMS Group when complete." _
& vbNewLine & vbNewLine & "Thank you - Account Management"
.Send
End With
Set iMsg = Nothing
End If
End If
If cell.Offset(0, 1).Value < "" Then
If cell.Value Like "?*@?*.?*" And LCase(cell.Offset(0, 1).Value)
= "sales" Then
Set iMsg = CreateObject("CDO.Message")
With iMsg
Set .Configuration = iConf
.To = cell.Value
.From = """Account Mgmt"" "
.Subject = "New Book Entry Checklist" & " - " &
Sheets("Account Mgmt Checklist").Range("F5").Value
.TextBody = "Hello " & cell.Offset(0, -1).Value &
vbNewLine & vbNewLine & _
"Please review the Book Entry Checklist and
forward to the DMS Group when complete." _
& vbNewLine & vbNewLine & "Thank you - Account Management"
' looking to add one more line here that would attach a copy of "Account
Mgmt Checklist"
.Send
End With
Set iMsg = Nothing
End If
End If
Next cell
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
End Sub