Results 1 to 4 of 4

Send e-mail - filter date range & customer name

Threaded View

  1. #1
    Registered User
    Join Date
    01-30-2020
    Location
    UK
    MS-Off Ver
    2013
    Posts
    82

    Send e-mail - filter date range & customer name

    Evening All

    With the attached worksheet I am trying to e-mail the customer a weekly acknowledgement e-mail of the submissions they sent last week (Monday-Sunday) and submissions which have been completed.

    I have two issues:

    - The code e-mails every customer, even if they didn't send or have completed any work last week. I'm guessing I need to alter the below?

    OrigList = ""
        For Each C1 In OrigRng
            If Not OrigList Like "*" & C1 & "*" Then
                If Len(OrigList) > 0 Then OrigList = OrigList & ","
                OrigList = OrigList & C1
            End If
        Next C1
        
        Origs = Split(OrigList, ",")
    - Secondly, I cannot get the code to pick up the date range in Column D. If I change the format to number type no problem but in Date format the e-mails all appear blank. Any ideas please?

    If ProjData(6) >= CDbl(LW3) And _
            ProjData(6) <= CDbl(LW1) Then
                If Len(RecBullets) = 0 Then RecBullets = "<b><u>SUBMISSION RECEIVED</b></u><ul>"
                RecBullets = RecBullets & "<li>" & ProjData(1) & " - " & ProjData(9) & ": " & ProjData(9) & "</li>"
            End If
          
            If InStr(ProjData(2), "Completed") > 0 And _
            ProjData(3) >= CDbl(LW3) And _
            ProjData(3) <= CDbl(LW1) Then
                If Len(CompBullets) = 0 Then CompBullets = "<b><u>SUBMISSIONS COMPLETED</b></u><ul>"
                CompBullets = CompBullets & "<li>" & ProjData(1) & " - " & ProjData(5) & ": " & ProjData(9) & "</li>"
            End If


    Many thanks!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Send outlook mail based on a today's date and customer name
    By manieldunk in forum Excel Programming / VBA / Macros
    Replies: 21
    Last Post: 06-20-2018, 02:04 PM
  2. [SOLVED] Send mail to all in range
    By forfiett in forum Excel Programming / VBA / Macros
    Replies: 28
    Last Post: 08-06-2014, 01:12 PM
  3. Replies: 1
    Last Post: 03-11-2014, 12:24 PM
  4. Using VBA to send a range in pdf via e-mail
    By BullseyeThor in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2013, 11:54 AM
  5. Filter based on today's date and send mail in outlook
    By kandanuru in forum Excel General
    Replies: 0
    Last Post: 06-15-2012, 04:59 AM
  6. Replies: 3
    Last Post: 05-11-2012, 09:21 AM
  7. How to e-mail selected row and use e-mail address in a cell to send e-mail from excel
    By syedalamgir in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-27-2010, 02:15 AM

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