+ Reply to Thread
Results 1 to 7 of 7

Macro to send email with attachment for each unique email Ids

  1. #1
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Macro to send email with attachment for each unique email Ids

    Hi,

    I need help for a Macro to filter data for each unique email Ids and send email as attachment and as well as data content as table.

    Please assist.

  2. #2
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Re: Macro to send email with attachment for each unique email Ids

    Could some one help with excel macro.

  3. #3
    Registered User
    Join Date
    06-16-2014
    Location
    United States
    MS-Off Ver
    2013
    Posts
    72

    Re: Macro to send email with attachment for each unique email Ids

    Function SendMail()
    Dim y As String
    Dim x As Integer
    y = Sheets(1).Range("M1").Value
    x = Sheets(1).Range("K1").Value
    ' Copy the sheet(1)
    ThisWorkbook.Sheets(x).Copy
    ' Send Email
    With ActiveWorkbook
    .SendMail Recipients:=y, Subject:="test" & Format(Date, "dd/mmm/yy")
    .Close SaveChanges:=False
    End With
    ' Subject:=Range("Feuil1!B1").Value & " " & Range("Feuil1!A1").Value
    End Function
    Last edited by flextera; 07-03-2014 at 03:17 PM.

  4. #4
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Re: Macro to send email with attachment for each unique email Ids

    It does not work for the attached spreadsheet. Could you send me sample.

  5. #5
    Forum Contributor
    Join Date
    01-05-2011
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    243

    Re: Macro to send email with attachment for each unique email Ids

    Could anyone help me with the macro.

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Macro to send email with attachment for each unique email Ids

    Hi, vijanand1279,

    just my 2 cents here. Instead of bumping your thread you should consider to alter the description or amend the data in order to supply more information for those who might be able to help (if they only knew what you areasking for).

    I need help for a Macro
    You could start recording the steps you want to perform with macro recorder to get some basic code. Although the recorder will deliver hard coded ranges you should at least get a basic idea of how the code may look.

    send email as attachment
    What does that mean? What should be the attachment? What mail program to work with?

    as well as data content as table
    What data? What range? How to handle duplicates in the range if I assume you want the filterd range to be inserted into any mail?

    I wonder what you have managed to achieve so far, no macro code has been posted by you.

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  7. #7
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: Macro to send email with attachment for each unique email Ids

    one way is
    -hide duplicates, copy the unique email addresses to sheet2, unhide the duplicates and then send email to addresses from column D (sheet2).
    and yes, Holger is right regarding the attachment.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

+ 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. VBA Code: MACRO to send lotus notes email with excel attachment
    By FLani in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2013, 10:23 AM
  2. Macro to Send whole Sheet via Email in text format not as attachment
    By mobi4u in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2012, 04:37 PM
  3. Macro to send email with multiple attachment
    By excelcheck123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2012, 05:00 PM
  4. Macro to send Email to Unique Recipients
    By jhuang in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-17-2012, 02:37 AM
  5. How to send the doc to email as an attachment
    By mdkaye in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-08-2009, 06:25 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