+ Reply to Thread
Results 1 to 1 of 1

Send 2 follow up email in Outlook to multiple recipients

  1. #1
    Registered User
    Join Date
    03-24-2018
    Location
    Sydney
    MS-Off Ver
    2013
    Posts
    2

    Send 2 follow up email in Outlook to multiple recipients

    Hi all

    My team and I send more than 1000 emails via Outlook to customers requesting for payments on a regular basis. The payment needs to be received in 10 working days. If payment isn't received by the due date then follow up email is required. I found a code to do this but the problem is the vba still sends an email to everyone rather than just the people who haven't been followed up. Can someone please help to stop unnecessary follow ups being sent? Thank you so so much!

    Column A = Division
    Column B = Department
    Column C = Payment Description
    Column D = Date invoice was sent
    Column E = Date payment was received
    Column F = Date follow up is required
    Column G = Date Overdue Notice was sent
    Column H = Date final notice needs to be sent
    Column I = Date final notice is sent
    Column J = Email Address

    Here's the code:

    Sub Overdue()

    Dim lRow As Integer
    Dim i As Integer
    Dim toDate As Date
    Dim toList As String
    Dim eSubject As String
    Dim eBody As String
    Dim sourceCol As Integer
    Dim currentRowValue As String

    With Application
    .ScreenUpdating = False
    .EnableEvents = False
    .DisplayAlerts = False
    End With

    ThisWorkbook.Sheets("Sheet1").Select
    lRow = Cells(Rows.Count, 10).End(xlUp).Row

    For i = 3 To lRow
    toDate = Replace(Cells(i, 6), ".", "/")

    If Left(Cells(i, 6), 10) <> "Mail" And toDate - Date < 0 Then
    Set outapp = CreateObject("Outlook.Application")
    Set OutMail = outapp.CreateItem(0)

    toList = Cells(i, 10)
    eSubject = "xxxx"
    eBody = "xxxx"

    On Error Resume Next
    With OutMail
    .sentonbehalfofname = "xxxx"
    .To = toList
    .CC = toDel
    .BCC = ""
    .Subject = eSubject
    .Body = eBody
    .bodyformat = 1
    .Send
    End With

    On Error GoTo 0
    Set OutMail = Nothing
    Set outapp = Nothing
    Cells(i, 7) = Date + Time
    End If
    Next i

    ActiveWorkbook.Save

    With Application
    .ScreenUpdating = True
    .EnableEvents = True
    .DisplayAlerts = True
    End With
    End Sub
    Last edited by la2x; 07-12-2018 at 06:13 AM. Reason: Not all cells are applicable. Also solution to the problem was found which resulted a new issue

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to send an email to multiple recipients from outlook with PDF.
    By marc5354 in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 12-10-2015, 07:51 PM
  2. [SOLVED] excel vba to send email to multiple recipients in CC
    By Kimston in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-01-2014, 07:03 AM
  3. send email to multiple recipients
    By plans in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-18-2014, 09:26 AM
  4. Send workbook via email to multiple recipients
    By jdavies294 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-16-2014, 10:44 AM
  5. send email from excel to multiple recipients
    By hariexcel1987 in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 01-13-2013, 01:41 PM
  6. Send email to multiple recipients
    By Court16 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-24-2009, 05:20 PM
  7. Send workbook via email to multiple recipients
    By lethal in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-25-2008, 06:58 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1