LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Email Question (Ron De Bruin related)

Hello all

I was looking at some of Ron's email code on his website. I tested a few and they worked great. I am interested in this code found he Mail a message to each person in a range (Outlook only) http://www.rondebruin.nl/sendmail.htm#messag

I have a question though. The code looks in a column and emails everyone in it. I'm trying to have an automated emailing list but the problem I have is that in my spreadsheet we have names repeated a lot. I dont want the person getting 10-20 emails that say the same thing. Does anyone have any idea to make it so that the person on the list will get emailed only once? need some brainstorming

The code in the link above will just loop down the column and email people regardless of who they are. My code has been changed a bit and instead of looking for a yes, it looks for "5" (as in 5 days remaining till an action is due)

Sub SendEmailRoutine(
Dim olApp As Outlook.Applicatio
Dim olMail As MailIte
Dim cell As Rang
Application.ScreenUpdating = Fals
Set olApp = New Outlook.Applicatio
For Each cell In Sheets("Sheet1").Columns("F").Cells.SpecialCells(x lCellTypeConstants
If cell.Offset(0, 1).Value < "" The
If cell.Value Like "*" And cell.Offset(0, 1).Value = "5" The
Set olMail = olApp.CreateItem(olMailItem
With olMai
.To = cell.Valu
.Subject = "Reminder
.Body = "Dear " & cell.Value & vbNewLine & vbNewLine &
"You have an action due in 5 days! Please contact us.
.Send 'Or use Displa
End Wit
Set olMail = Nothin
End I
End I
Next cel
Set olApp = Nothin
Application.ScreenUpdating = Tru
End Su

Thanks
Lob



 
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
Lookup related question Craig Excel Worksheet Functions 1 June 23rd 09 04:48 PM
question for Ron de Bruin on importing JohnE Excel Discussion (Misc queries) 2 August 23rd 07 01:52 AM
Function Related Question Sandeep Arora Excel Discussion (Misc queries) 1 February 2nd 05 07:36 PM
Email from Excel att: Ron de Bruin Edgar[_3_] Excel Programming 1 January 26th 04 04:03 PM
A Question for Ron de Bruin Jamal[_2_] Excel Programming 3 January 9th 04 04:12 PM


All times are GMT +1. The time now is 12:55 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"