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: 1
Default Email help...need IF statement for more than one recipient


I need some help with a macro I am creating. I have the following code
to create an email


Code:
--------------------

Sub Reminder()

Dim myOutlook As Object
Dim myMailItems As Object
Dim strbody As String
Dim recipient As String

With ThisWorkbook.ActiveSheet
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMainItem)
strbody = "This is a reminder"
End With

'Central
If ActiveSheet.Range("E6:E2000") = "a" Then recipient = "

With OutMail
.To = recipient
.CC = ""
.BCC = ""
.Subject = "Reminder"
.Body = strbody
.Display
End With

Set OutMail = Nothing
Set OutApp = Nothing

End Sub

--------------------


If you look at the attachment, I will have various sheets with
Estimators initials (KM is just one sample). What I would like to do
is create a macro that will run on the active sheet (so whomever is
looking at their own report can run the email on their data only), and
send emails to those with days remaining <5. As well, I would like it
to send to the specialists who are associated with the zones that have
checkmarks. I also have the specialists listed on a separate sheet
with their email addresses.

I was thinking about using an IF statement, but not sure how I would do
that. Any help would be much appreciated.

Thanks


--
tanyhart
------------------------------------------------------------------------
tanyhart's Profile: http://www.excelforum.com/member.php...o&userid=35148
View this thread: http://www.excelforum.com/showthread...hreadid=555082

 
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
Send To Email recipient one sheet from workbook Doug Excel Discussion (Misc queries) 1 October 3rd 08 05:38 PM
.xls email attachments are arriving at the recipient as .dat file. UK-Graham Excel Discussion (Misc queries) 4 February 11th 05 05:32 PM
checkbox to remove recipient from email FastFord[_4_] Excel Programming 0 February 23rd 04 08:45 AM
Checkbox to remove recipient from email FastFord Excel Programming 1 February 22nd 04 10:04 AM
File...Send To...Email Recipient Bill Oertell[_2_] Excel Programming 2 January 1st 04 03:02 AM


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