MobileMobile | Continue

Excel Bar

Excel Bar

Your excel questions will be responsed by our excel experts within 24hrs.Our service is free.

 Forgot Pass?
 Register Now
Find
Hot Search: Vlookup Match VBA
View: 295|Reply: 7

Excel auto email notification

[Copy link]

1

Topics

1

Posts

5

Integral

Newbie

Rank: 1

Integral
5
Post on 9-14-2016 18:33:48 | All posts |Read mode
Hi i'm kind of new to this aspect of excel so I'm hoping someone can assist me on how to have excel send a email with data from a table via outlook automatically every 4 days after the the receiving date I have attached a sample of the table data i am looking to send.








Attached Files


  • Book1.xlsm
    (9.5 KB, 10 views)
    Download

  • Reply

    Props Report

    5

    Topics

    242

    Posts

    565

    Integral

    Lord

    Rank: 4

    Integral
    565
    Post on 11-22-2016 17:36:34 | All posts



    There is no attachment in your post, but if your using outlook, this has been a very helpful site for a lot of us, including myself regarding auto email.
    http://www.rondebruin.nl/win/section1.htm
    Reply Support Opposition

    Props Report

    5

    Topics

    242

    Posts

    565

    Integral

    Lord

    Rank: 4

    Integral
    565
    Post on 12-23-2016 07:30:58 | All posts



    There is no attachment in your post, but if your using outlook, this has been a very helpful site for a lot of us, including myself regarding auto email.
    http://www.rondebruin.nl/win/section1.htm











    Reply Support Opposition

    Props Report

    1

    Topics

    13

    Posts

    35

    Integral

    Member

    Rank: 2

    Integral
    35
    Post on 12-23-2016 08:06:50 | All posts



    Hi Tom,
    Sorry for the delay in replying, it wouldn't attach the file for some reason so I uploaded it to dropbox, I'll have a look at the link though thanks!
    Best regards,
    Gus




    Reply Support Opposition

    Props Report

    1

    Topics

    13

    Posts

    35

    Integral

    Member

    Rank: 2

    Integral
    35
    Post on 12-23-2016 09:28:23 | All posts



    Hi Tom,
    I've been trying to change the code I've got from the link you provided, but I've been struggling to get it to work for what I need.
    I found a different code which does the basic sending out an email to specific address, do you think you could assist me in adding some code so that it will go down a range of email addresses?
    Sub Send_Email_Using_VBA()
    Dim Email_Subject, Email_Send_From, Email_Send_To, _
    Email_Cc, Email_Bcc, Email_Body As String
    Dim Mail_Object, Mail_Single As Variant
    Email_Subject = Trying to send email using VBA
    Email_Send_From = databison@gmail.com
    Email_Send_To = databison@gmail.com
    Email_Cc = databison@gmail.com
    Email_Bcc = databison@gmail.com
    Email_Body = Congratulations!!!! You have successfully sent an e-mail using VBA !!!!
    On Error GoTo debugs
    Set Mail_Object = CreateObject(Outlook.Application)
    Set Mail_Single = Mail_Object.CreateItem(0)
    With Mail_Single
    .Subject = Email_Subject
    .To = Email_Send_To
    .CC = Email_Cc
    .BCC = Email_Bcc
    .Body = Email_Body
    .Display
    End With
    debugs:
    If Err.Description   Then MsgBox Err.Description
    End SubSo for example if the headers were in the first row and the email address were specified in column E, how do I get the code to send an email to each address in that column?
    Best regards,
    Gus
    Reply Support Opposition

    Props Report

    1

    Topics

    13

    Posts

    35

    Integral

    Member

    Rank: 2

    Integral
    35
    Post on 12-23-2016 14:36:23 | All posts



    Hi Tom,
    I've been trying to change the code I've got from the link you provided, but I've been struggling to get it to work for what I need.
    I found a different code which does the basic sending out an email to specific address, do you think you could assist me in adding some code so that it will go down a range of email addresses?
    Sub Send_Email_Using_VBA()
    Dim Email_Subject, Email_Send_From, Email_Send_To, _
    Email_Cc, Email_Bcc, Email_Body As String
    Dim Mail_Object, Mail_Single As Variant
    Email_Subject = Trying to send email using VBA
    Email_Send_From = databison@gmail.com
    Email_Send_To = databison@gmail.com
    Email_Cc = databison@gmail.com
    Email_Bcc = databison@gmail.com
    Email_Body = Congratulations!!!! You have successfully sent an e-mail using VBA !!!!
    On Error GoTo debugs
    Set Mail_Object = CreateObject(Outlook.Application)
    Set Mail_Single = Mail_Object.CreateItem(0)
    With Mail_Single
    .Subject = Email_Subject
    .To = Email_Send_To
    .CC = Email_Cc
    .BCC = Email_Bcc
    .Body = Email_Body
    .Display
    End With
    debugs:
    If Err.Description   Then MsgBox Err.Description
    End SubSo for example if the headers were in the first row and the email address were specified in column E, how do I get the code to send an email to each address in that column?
    Best regards,
    Gus




    Reply Support Opposition

    Props Report

    8

    Topics

    161

    Posts

    392

    Integral

    Conqueror

    Rank: 3Rank: 3

    Integral
    392
    Post on 12-23-2016 15:10:43 | All posts



    try this:
    Sub Send_Email_Using_VBA()
    Dim Email_Subject, Email_Send_From, Email_Send_To, _
    Email_Cc, Email_Bcc, Email_Body As String
    Dim Mail_Object, Mail_Single As Variant
    din lr  as long, i as long
    Email_Subject = Trying to send email using VBA
    Email_Send_From = databison@gmail.com
    Email_Send_To = databison@gmail.com
    Email_Cc = databison@gmail.com
    Email_Bcc = databison@gmail.com
    Email_Body = Congratulations!!!! You have successfully sent an e-mail using VBA !!!!
    On Error GoTo debugs
    lr= Cells(Rows.Count, 5).End(xlUp).Row  ' here is the row that has the column of all the emails. You can change the number to the number of the correct column.
    For i = 2 to Lr
    Set Mail_Object = CreateObject(Outlook.Application)
    Set Mail_Single = Mail_Object.CreateItem(0)
    With Mail_Single
    .Subject = Email_Subject
    .To = cells(i,5).value
    .CC = Email_Cc
    .BCC = Email_Bcc
    .Body = Email_Body
    .Display
    End With
    next i
    debugs:
    If Err.Description   Then MsgBox Err.Description
    End Sub











    Reply Support Opposition

    Props Report

    1

    Topics

    13

    Posts

    35

    Integral

    Member

    Rank: 2

    Integral
    35
    Post on 12-23-2016 15:48:07 | All posts



    That does exactly what I need and I was able to add to the code which is great. Thank you for the help.
    Regards,
    Gus
    Reply Support Opposition

    Props Report

    Points policy of this forum

    Archiver|Mobile|Small dark house|Contact us|Excel Bar

    GMT-5, 9-25-2017 11:47 , Processed in 0.280037 second(s), 20 queries .

    Powered by Discuz! X3

    © 2001-2013 Comsenz Inc.

    !fastreply! Top !return_list!