Email Multiple Worksheets To Multiple Recipients In One File Per Recipient?
Mar 27, 2014
I'm trying to email multiple worksheets from a list to multiple recipients in a list, but in one file per person. In a sheet called "Email list", for example, I have a list of 50 worksheet names (e.g. one for each cost centre) in column A (with a heading in cell A1, if that's OK, so the list starts in A2) and in columns B-F up to 5 recipients for each worksheet (e.g. 3 recipients might be 2 supervisors and their manager).
Also, each manager and supervisor might also receive several sheets.
Although columns B-F are presently free-format (they can be anyone's email address, regardless of whether they're a supervisor or manager), it might be easier to split these columns so B,C,D are supervisors emails and E,F are managers, if that makes it any easier creating the collated file of worksheets..?
Unfortunately the recipients might change occasionally so they can not be hard keyed into the macro itself (which would be much easier), but need to be in a table so it's easier for the user to update and maintain - in the past, I've managed to hard key the requirement into a macro which I've maintained (by recording and editing the macro), but I don't know the VB to figure this new request.
Ideally, I am trying to create a macro that can collate the various worksheets each person will receive and send the selected sheets in one file to that recipient, rather than multiple files within one email and/or multiple emails.
Auto generating an e-mail that will consolidate duplicate rows for 'column a' in my attachment. The key here isn't necessarily deleting the rows... What i really need is vba code that will enumerate through the table and auto generate an e-mail for each individual. For each individual, i need the code to generate a table in the body of the e-mail & attach the activity for that recipient and the date. The trip up here is when a recipient has two activities associated to their name, and their name shows up multiple times in the data set.
I need the code to a) identify the duplicate recipient, b) send out 1 email for that person, and c) attach each activitiy/date (2 or more) to a table.
Automate the Consolidation of Duplicate Recipients to 1 Email (2).xlsm
I'm not sure if this is a macro problem or an Outlook problem. I'm using the routine below to email a group of recipients through Outlook (not Outlook Express). The routine works fine for one recipient, but doesn't seem to work for multiples. I searched online, and found a solution of putting the email addresses like this: "Joe@email.com;Bob@email.com;Mary@email.com"
That didn't work, so I tried it below with AND, which also doesn't work. What happens in both examples is that Outlook tells me something else is sending a message, and do I want to allow it (same as message when I send to a single recipient). I say "yes", it appears to go through, but nothing is sent from my outbox. Here's the
I am using the following code to try and send a workbook via attachment to multiple email recipients however it will not work. If I only include one recipient then the code runs fine however it crashes when there is more than one.
Here is my code below for a program that opens a user interface, lists all the names of tabs in the spreadsheet in a list box. By selecting an item (or sheet name) in the list box then clicking "email" a specific area of that selected sheet is sent to an email address located on the sheet.
What I would like to have happen is with the click of a button email each sheet to the specified email address. So if there were 100 sheets rather than clicking on each name then clicking email, have one button to email the each individual sheet to the associated email address. I am guessing something like a "For" loop would be required but am not quite sure how to implement.
Code: Private Sub CommandButton2_Click()
Private Sub ListBox1_Click() 'this will set the label caption depending on which sheet is selected in the list box
I have searched high and low on the forum and can not seem to find a solution to my problem. Here is my problem (besides being new to Lotus Notes): I need a button on my excel worksheet that gets information from Column H in the attached spreadsheet and puts all the emails in the To: (could be >than 100 email addresses) Field in Lotus Notes. I would like to have the subject read "New Email from Your Basin Coordinator" and have the CC list come from a second worksheet (CC).
My vb code works well for sending worksheets to multiple recipients (about 400 rows) IF I have only one email address in a cell, however, I have some rows that have more than one email address (eg. email@example.com, firstname.lastname@example.org). I've spent hours researching a clean way to do this and I think I need to be able to extract each of them and assign them to a variable to use in an array???
I'm using Lotus Notes 6.5 and Excel 2003.
'Here is where I get the email address to put in the mailAddress variable Workbooks("GSA Mileage Report.xls").Activate mailAddress = "" On Error Resume Next mailAddress = Application.WorksheetFunction. _ VLookup(EmailAddrSheet.Cells(RowNum, 1).Value, _ Worksheets("MailInfo").Range("A1:B" & _ Worksheets("MailInfo").Rows.Count), 2, False) On Error GoTo 0
it is possible to set up a macro that can route a file to specific people based on conditions in the file? what i am trying to do is route via email a excell file on dollar amount. So if file is for $10,000 ; send it to 2 specific people. If its for $90,000 send to specific 4 people.
get the code for sending multiple emails as per the spreadsheet list. Assume the spreadsheet has 100 line items and each columns specifies the name of the person, value, recipient email address ("To" and "CC") and sender name.
And the Body of text is :
Hi "Name of the person" Please find the value of "Value" to be paid for the moth of xxx and kindly let me know for further clarification.
So i want to be able to send a single Excel sheet to a recipient, not already pre-defined in the VBA. I am trying to get to where i can click a button/link and a window pops up, asking me to enter recipient's email address. When I enter the address and press- 'Send', the email is sent using Outlook.
I'm currently doing a survey using an excel workbook that contains multiple questions across multiple worksheets using radio buttons linked to certain cells.
I have around 400 workbooks coming back to me, so what i want to do is take specific values from across many worksheets within each workbook and combine them into a large master table in a seperate workbook.
I've tried using VBA, but not being very proficient at it i've hit a brick wall with that, so i'm hoping that there is an easier way to do it than what i'm currently pursuing.
I have a file that opens a number of files from a source directory (which is identified by the User at run-time) & merges the source data into various worksheets (which all works fine)
Now what I'd like to be able to do is to be able to (silently) save multiple worksheets back to separate files in the original directory based on each worksheet name - e.g:
"Sheet1" and "Control" Sheet" are saved to SourceDirectorySheet1.xlsm "Sheet2" and "Control" Sheet" are saved to SourceDirectorySheet2.xlsm "Sheet3" and "Control" Sheet" are saved to SourceDirectorySheet3.xlsm ... "Sheetn" and "Control" Sheet" are saved to SourceDirectorySheetn.xlsm
(Note that "Control Sheet" also contains Command Buttons & VBA which I'd like to preserve)
I feel like I almost have the Excel button I need (thanks to an exhaustive forum search), but I have 2 problems that I need help to correct. First, the code works fine if I have one email address in my Email column, but If I add a second or third email in my column, the code sends the mail, but bounces back because of an Invalid Internet address specified error. The response looks to me like it is taking the first address and appending to the second email recipient. An example would be <email@example.com,example>@example.com. Here is the code I am using:
I found the following macro after much digging and got it to work for me, but I'd like to go one better. Currently it sends a simple breakdown of orders that need to be placed. The data lies in a sheet called "Orders" where column A is the vendor name and column B is the order total.
This data is pulled from numerous other sheets, one for each vendor. What would be awesome is if I could send each vendor an email consisting of:
1. Item Number - Column C 2. Item Description - Column D 3. My Cost - Column F 4. Quantity to Order - Column J 5. Order Total - Column K
The complications I've thought of so far:
1. Each sheet is an inventory for the items we have from that vendor. It could be just a few items, or it could be two hundred. 2. There is one row per item, but not every item will have need to be ordered. I don't want an item to be included in the email unless there is an order quantity in column J associated with it. 3. Each sheet should be emailed to a different address which I'll put in A1 for that sheet.
I'm thinking I should do this under each sheet so I can just hit a button on that vendor's sheet and send each order independently.
Sub LNotesEmailPartsOrders() Dim NSession As Object Dim NDatabase As Object Dim NUIWorkSpace As Object Dim NDoc As Object Dim NUIdoc As Object
I have a macro currently using the activeworkbook.sendmail command to send out an email using LOTUS NOTES with the workbook as an attachment. Unfortunately, the code appears to only support putting recipients in the TO field. I need to be able to also add additional recipients under the CC field.
I have an excel sheet with 25,000+ emails in column A with hyperlinked emails addresses, Column B has different Subject lines based on the category the clients belongs to but on the same sheet, Column C has the following hyperlink :
To create a hyperlink of the email address with the desired subject line.
macros that i could use to open about 25/50 outlook message with the email ids in column A of the sheet and the subject lines in column B.
I don't want the messages to be sent automatically but i want to have the option to change the body of the email if necessary.
I been trying to create stuff that will make my work life real easy. I need creating a program that will send an email to different recipients. I created a spreadsheet the contains different information. When a persons name is selected on Column D, excel/outlook will generate an email to that person containing the info on Column A to D.
And then as soon as the work is processed and column G is filled, outlook will generate an email back to who created the requests column A.
I'm trying to create a macro the saves a report and then opens an email dialogue box populating the recipients from a list. I have the following code so far but the receivers are constant.
I have attached a simplified example of the list. The list is always sorted by time and date. Not including headers, the list can be from 1 to an unspecified number of users long and users may repeat throughout the list any number of times.
The user name always appears as their email address prefix and the email address will always end in "@example.com".
I am aware that a loop could perform this task but do not know how to employ it in this case as it must not repeat recipients and will also need to populate the EmTo line. Possibly a second loop for this?
If a cell changes to true i want it to send an email to the address that is in another cell,
For example if F5 CHANGES to true then send email to address in G5,
From here i can add in the subject line, and body i just cant figure out how to get it to send to a specific email address based on the cell value, and also only do it once, when it changes to TRUE rather than everytime the sheet is active, so i would require a macro to constantly be running, or run of off the cell when it changes