LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Questioin for Ron de Bruin

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
 
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
.TextFileFixedColumnWidths (from Ron de Bruin) Corey Excel Discussion (Misc queries) 3 November 28th 07 08:36 PM
[email protected] Ron de Bruin Excel Discussion (Misc queries) 1 July 21st 05 01:07 PM
Formula questioin Karen53 New Users to Excel 4 May 22nd 05 07:14 PM
For Ron Bruin Please Steved Excel Worksheet Functions 6 April 6th 05 02:19 AM
For Ron de Bruin Please Steved Excel Worksheet Functions 6 March 16th 05 12:46 AM


All times are GMT +1. The time now is 07:41 PM.

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"