+ Reply to Thread
Results 1 to 6 of 6

VBA Mail with multiple CC

  1. #1
    Registered User
    Join Date
    01-22-2022
    Location
    Manchester
    MS-Off Ver
    2016
    Posts
    8

    VBA Mail with multiple CC

    Hi,

    I am new in the forum. I would like to ask you a question about vba mailing. I can do it simple like a mail with a receipent, a CC and a subject only. But this time I need with multiple CC's, changeable mail body and image inside of the body (with center align)

    Image Banner

    Body

    Reason 1
    Reason 2
    etc.

    Image Banner


    I have three sheets on excel. List, body and reason. I need to send auto mails with this draft. Reasons can be more than 2, so I have to use FOR there, but I dont know how and I need to put it under body message as a table. Reason topics can be added as new columns next to subject in list sheet. If anyone help me here, I would be glad. Not sure if it's easy but complicated for me.
    Attached Files Attached Files
    Last edited by kenzel; 01-22-2022 at 06:14 PM.

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: VBA Mail with multiple CC

    Can you explain how you want the data in the "reason" tab included in the email?

  3. #3
    Registered User
    Join Date
    01-22-2022
    Location
    Manchester
    MS-Off Ver
    2016
    Posts
    8

    Re: VBA Mail with multiple CC

    Hi again. Thanks for interest. I've updated excel file.

    I need to add recipients, CC's (max 4) and the subject from the sheet, also the reasons, and I would like to create a table for the reason list. You can see it from the new excel file as draft.

    For example, if someone has 2 reasons, I just need a 2x2 table (except header) for reasons, and otherwise 3x3 etc. But maximum is 4.

    Also, I need changeable body for the recipient. For instance, Dear Student "TO". I would be glad if I find a solution here. I dont have to do it with three different sheets. If there is easier option, I would be happy.
    Attached Files Attached Files
    Last edited by kenzel; 01-22-2022 at 06:17 PM.

  4. #4
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: VBA Mail with multiple CC

    Here is first pass at your code. Let me know if you have questions.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-22-2022
    Location
    Manchester
    MS-Off Ver
    2016
    Posts
    8

    Re: VBA Mail with multiple CC

    Thanks maniacb, this works great. I want to ask three questions.

    How can I make the body message center align?
    I did my banner image center but I can not do it for the body message.
    So its like

    Please Login or Register  to view this content.
    I want to make body as long center as I did for image.


    How can I put changeable text fed from list sheet in the body? For example, Dear "TO".. And TO changes by the value from list sheet K2.

    Last one is about table. I would like to see the table with borders. Is it possible?
    Last edited by kenzel; 01-23-2022 at 12:17 AM.

  6. #6
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: VBA Mail with multiple CC

    Here is an updated file. I used column F instead of column K for your changeable "TO" field. The table has a separation, but otherwise shows the cell borders.

    Please Login or Register  to view this content.
    Attached Files Attached Files

+ 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 mail merge multiple
    By issa.o in forum Word Formatting & General
    Replies: 2
    Last Post: 06-21-2017, 08:43 PM
  2. [SOLVED] e-mail multiple people
    By Kvasir15 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-29-2015, 05:03 PM
  3. Mail multiple attachments from multiple sheets
    By uky in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-22-2013, 12:13 AM
  4. VBA program to mail a row to multiple people
    By g1987 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-09-2012, 09:01 PM
  5. 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
  6. E-mail with multiple attachments
    By adam2308 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2009, 08:21 AM
  7. E-mail Multiple Attachments
    By STEVEB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-02-2005, 11:17 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