+ Reply to Thread
Results 1 to 6 of 6

Expiry dates - to send automated emails

Hybrid View

  1. #1
    Registered User
    Join Date
    07-16-2015
    Location
    Brighton, England
    MS-Off Ver
    2010
    Posts
    71

    Re: Expiry dates - to send automated emails

    Hello fellow Brightonian!

    I use this at my work below. Some parts may need amending to your needs. This isn't possible without Excel open unless you have a personalworkook thats coded to autostart with huge amounts of arrays holding data. Anyhow, outlook VBA may be easier to work with for that if its vital.

    Sub SetRecipients()
    Dim aOutlook As Object
    Dim aEmail As Object
    Dim rngeAddresses As Range, rngeCell As Range, strRecipients As String
    
    Set aOutlook = CreateObject("Outlook.Application")
    Set aEmail = aOutlook.CreateItem(0)
    Set rngeAddresses = ActiveSheet.Range("B3:B13")
    
    For Each rngeCell In rngeAddresses.Cells
    strRecipients = strRecipients & ";" & rngeCell.Value
    Next
    
    aEmail.Importance = 2 ' eg
    aEmail.Subject = "(TestMail)"
    aEmail.Body = "(TestSubject)"
    aEmail.ATTACHMENTS.Add 'try document path
    aEmail.To = strRecipients
    
    aEmail.Send
    
    End Sub

  2. #2
    Registered User
    Join Date
    03-25-2016
    Location
    Brighton, England
    MS-Off Ver
    Microsoft Excel 2010
    Posts
    3

    Re: Expiry dates - to send automated emails

    Hello thanks for the quick reply fellow Brightonian!

    Surely this cant be the amount of code I need I tried my own but it was getting awfully complicated and didn't work lol

+ 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. Excel vba to auto-send customer emails (duplicate emails issue)
    By nadz84 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-29-2015, 10:08 AM
  2. Send Emails once expiry date is reached, and generate report based on emails sent
    By demonicscorpion in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-18-2014, 05:36 AM
  3. Search multiple columns of dates and send reminder email 30 days before expiry
    By prh2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-20-2013, 12:47 AM
  4. Creating A macro to send emails for specific dates and information
    By Brian_D in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-14-2013, 01:09 PM
  5. Is it possible to send automated emails from excel to outlook web app.
    By jayant24 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-24-2013, 06:14 AM
  6. [SOLVED] Want to send Automated Emails
    By joe41 in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 03-24-2009, 06:30 AM
  7. [SOLVED] Can excel send reminder emails on dates entered in a wookbook?
    By Doubting_her_boss in forum Excel General
    Replies: 2
    Last Post: 10-27-2005, 05:05 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