#1
|
|||
|
|||
Sending emails based on criteria and addresses in Excel sheet
I have never done a mail merge, so I don't know the terminology to use. I have an Excel sheet with several hundred email addresses. Each address may belong to one or more groups. For each group there is a column. When an email is sent to the group, only those addresses belonging to the group should be sent an email. The text for the email contents could be in Word documents or draft Outlook emails, whichever is easier. How is this accomplished? Example: Col A Col B Col C Col D Group 1 Group 2 Group 3 Email x x Nerd1@mail.com x Nerd2@mail.com x x Nerd3@mail.com When sending to Group 1, Nerd1 and Nerd2 would be emailed. When sending to Group 2, Nerd1 and Nerd3 would be emailed. When sending to Group 3, Nerd3 would be emailed. Does this need VBA to select which Group the email is being sent to? How do I specify which draft email to send to each Group? |
#2
|
||||
|
||||
The 'Mail Merge' feature of Word is not powerful enough to do your mail out in a single pass since you have a number of complicating factors that go beyond the default functionality. But you can certainly do it via a series of passes. Or if you were an advanced user doing this mailout regularly then you could create and use a macro to do it with a single click.
To get started, you need to prepare the various contents of the mailout as separate mail merge docs for each 'Group'. Once the group's email is set up, filter the merge source to remove any rows which don't have that column marked and do the mailout to those rows. Do the same for the other groups. This means you do three mailouts (one for each group) and just filter the dataset to align with the group you want to send to.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
Thank you for the response. I'm trying to automate this for an end user who is not very capable. If I understand correctly, I will attempt an Excel user form to allow the end user to select which group(s) to send an email to. The VBA code will filter the list for just 1 group's members, select the appropriate Word document and run the mailmerge. It will then loop and repeat until all the selected groups have been iterated through.
Its been several years since I programmed in VBA, so it looks like I have something to occupy my time over the holidays. |
#4
|
||||
|
||||
Sounds like a fun exercise to occupy the Christmas break
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
Tags |
mail merge help |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Utilizing FORM to distribute emails based on criteria | zextrot | Outlook | 4 | 10-01-2018 08:04 AM |
Copy data from one sheet to another based on a certain criteria | shina67 | Excel Programming | 2 | 12-28-2016 07:32 AM |
need VBA to Transpose the Data from excel to word based on given criteria(status) | winmaxservices2 | Excel Programming | 1 | 12-19-2014 10:21 PM |
Excel VBA Macro - Deleting Specific Data based on criteria | MD011 | Excel Programming | 3 | 12-10-2014 02:15 AM |
Close excel sheet before sending ? | RoyLittle0 | Outlook | 0 | 10-25-2013 10:54 AM |