Hi Sir, I have a doubt. If in a single sheet multiple customers are there and I need only one email for that while creating the bulk email, then what should be the code
If you want to just one email with all the recipients in that email then this code might help you: Remove the outer loop and create a single loop just to gather all email addresses and put into one string like below to a string variable like below: strSingleBulkEmailAddress = "" ' Compose the single bulk email To string for multiple recipients via loop For intRow = 2 To intLastRow strSingleBulkEmailAddress = strSingleBulkEmailAddress + wSht.Range("C" & intRow).Value + ";" Next intRow Hope this helps you and please share this very useful Excel Power Tip.
@@excelpowertips7447 I am sorry that I explained wrong might be. My doubt is if in a sheet there is a single customer for 5 times but I want to use only one email for those 5 times with a same customer. I can't delete it because different invoices are the for one customer
So my example contains Two columns in the Excel sheet in columns C and D to pick up the To and CC email address in the VBA Loop code. To include more recipients you will either need to add new columns for each recipient or add the new recipients directly in code with a new CC list like this anonymous example: ' Set email properties With OutlookMail .To = wSht.Range("C" & intRow).Value ' Employee main email .CC = wSht.Range("D" & intRow).Value ' Manager Circular email ' For more than one CC separate with a semi-colon .CC = "New_Recipeint_1@gmail.com" & ";" & _ "New_Recipeint_2@gmail.com" & ";" & _ "New_Recipeint_3@gmail.com" & ";" & _ "New_Recipeint_4@gmail.com" & ";" & _ "New_Recipeint_5@gmail.com" & ";" & _ "New_Recipeint_6@gmail.com" & ";" & _ "New_Recipeint_7@gmail.com" & ";" & _ "New_Recipeint_8@gmail.com" This is the part of the code you need to adjust to include the new recipients (make sure you separate each email address with a semi-colon ";" as per above. It's a great question and hope this helps you. Thanks for watching and please share this Excel Power Tip.
Yes you should be able to attach any document file as you specify the full path in the Excel sheet for the VBA code to pick.
Thanks for watching.
Hi Sir, I have a doubt. If in a single sheet multiple customers are there and I need only one email for that while creating the bulk email, then what should be the code
If you want to just one email with all the recipients in that email then this code might help you:
Remove the outer loop and create a single loop just to gather all email addresses and put into one string like below to a string variable like below:
strSingleBulkEmailAddress = ""
' Compose the single bulk email To string for multiple recipients via loop
For intRow = 2 To intLastRow
strSingleBulkEmailAddress = strSingleBulkEmailAddress + wSht.Range("C" & intRow).Value + ";"
Next intRow
Hope this helps you and please share this very useful Excel Power Tip.
@@excelpowertips7447 I am sorry that I explained wrong might be. My doubt is if in a sheet there is a single customer for 5 times but I want to use only one email for those 5 times with a same customer. I can't delete it because different invoices are the for one customer
Hii sir..
I want to send excel table to outlook to more recipients... Can you help me how to create that
So my example contains Two columns in the Excel sheet in columns C and D to pick up the To and CC email address in the VBA Loop code. To include more recipients you will either need to add new columns for each recipient or add the new recipients directly in code with a new CC list like this anonymous example:
' Set email properties
With OutlookMail
.To = wSht.Range("C" & intRow).Value ' Employee main email
.CC = wSht.Range("D" & intRow).Value ' Manager Circular email
' For more than one CC separate with a semi-colon
.CC = "New_Recipeint_1@gmail.com" & ";" & _
"New_Recipeint_2@gmail.com" & ";" & _
"New_Recipeint_3@gmail.com" & ";" & _
"New_Recipeint_4@gmail.com" & ";" & _
"New_Recipeint_5@gmail.com" & ";" & _
"New_Recipeint_6@gmail.com" & ";" & _
"New_Recipeint_7@gmail.com" & ";" & _
"New_Recipeint_8@gmail.com"
This is the part of the code you need to adjust to include the new recipients (make sure you separate each email address with a semi-colon ";" as per above.
It's a great question and hope this helps you.
Thanks for watching and please share this Excel Power Tip.