This worked perfectly. I've been searching far and wide on how to include my signature when sending out emails via a loop. The trick, as you said, was moving .Display above .HTMLBody and adding "& .HTMLBody" to the end of the line. Those simple adjustments fixed it. Bless you sir.
Thanks for the video. Is there a way to specify a different outlook signature than than the default? Can we use the name of the signature we gave it when making the signature? If so can I have place holders in the signature, add the signature first an loop back and add excel data in place of place holders? Basically merge dynamic data into a specific outlook signature? I use signatures as templates and manually insert the data I need to use into them depending on the situation. I am hoping to automate these processes.
This is definitely possible. You can have various signatures as templates and overwrite the default signature from mail body with the desired template.
Great video. This works; however, when you replace .Body with .HTMLBody I lose the paragraph breaks I had before. How do I fix this? For example, before you replace .Body with .HTMLBody, you had three different lines in the VBA generated email. Those would now show up as concurrently running sentences?
Hi Kamal, Your code is great. It really helps me. Now after sending a new mail through this code I want to send a mail again to same email addresses after 3-4 days as a follow up mail, whom I didn’t get the revert in the same email chain/thread after sending first mail. How will I do it? Could you please advise. Thanks
Thank you for this. Just one question, though: "For i = 9 to Sheet1.Cells(Rows.Count,1).End(xlUp).Row" makes sense but I've always used "Next i" and not just "Next" at the end of the For loop. Can you get away with leaving out the "i" because it's not a nested loop?
Hi Kamal, thanks for uploading such useful coding material. I have almost watched all of your videos and huge fan of yours now..can you pls help me if I have to send a dynamic table basis a specific criteria to individual mail id's.for ex.. performance of a partner with a body snap shot..count of the partners could be in hundreds
Hi sir Any video on task scheduler in detail as I am looking for tasks to run automatically at scheduled time which will help me in reducing some man-hours
Hello kamal, video found useful , however in the body of the mail, i need paste the snapshot along with signature, i tried.display before htmlbody but not able to get, please help me with this
Hello Kamal, See in your demo excel you have the differnt body of the email for each Row (i.e in Column C ) you have the body for steve different, kamal differnt and for tema is different - i want to send emails at once with the same macro code with attachements but to add signature converting to .htmlbody will send only one email for at column A - Can u explain how to do add signature as default for all emails run in the Macro . Excel - column A - "To" ,column B- "CC" column C - "Subject " column D- " Body" Column E- I = "multiple attachments" Column J- Status . Below is my code . Option Explicit Sub Send_Mails() On Error Resume Next Dim sh As Worksheet Set sh = ThisWorkbook.Sheets("Send_Mails") Dim i As Integer Dim OA As Object Dim msg As Object Set OA = CreateObject("outlook.application") Dim last_row As Integer last_row = Application.CountA(sh.Range("A:A")) For i = 2 To last_row Set msg = OA.createitem(0) msg.to = sh.Range("A" & i).Value msg.cc = sh.Range("B" & i).Value msg.Subject = sh.Range("C" & i).Value msg.Body = sh.Range("D" & i).Value 'I need to include signature as default If sh.Range("E" & i).Value "" Then msg.attachments.Add sh.Range("E" & i).Value msg.attachments.Add sh.Range("F" & i).Value msg.attachments.Add sh.Range("G" & i).Value msg.attachments.Add sh.Range("H" & i).Value msg.attachments.Add sh.Range("I" & i).Value End If msg.display sh.Range("J" & i).Value = "Sent" Next i MsgBox "All the mails have been sent successfully" End Sub
Hi, This is very helpful specially with the signature part.. But what is the code so that you could create multiple emails with signatures.. You changed it on the last part and only made 1 email..
Hi Kamal, this video seems to be a solution for one of my automations. But, I am still getting some errors and unable to find the :Microsoft Outlook reference in the VBA. Is it different with Mac ?
Hi sir good morning It's really good job and I am very helpful on this tutorial Sir I have two three lines sentence out of that I need change two words for every email how to do that
Hi sir I am try to use the same method which one you have shown, I want to send one sentence out of that person name and DOB need to changed for every receptionist
Hello Sir..in the body part Body 1 = "Number : " .. i want to insert cell A1 value of active sheet..can you please tell me how to provide only one cell range
put attachment file paths in a separate column for each record. Then you can use .Attachments.add cells(r,c).value to attach the file. [assuming r is iterator for row and c is column having attachment paths]
Do you have signature set up in outlook? If yes, send me ur excel file and screenshot of a blank outlook email(create a new mail and take screenshot.).
@@xtremeExcel I keep receiving an error. I packed they syntax under the msg = OA.createitem(0) The syntax reads .SendUsingAccount =OIAppSession.Acoounts.Item(2)
This worked perfectly. I've been searching far and wide on how to include my signature when sending out emails via a loop. The trick, as you said, was moving .Display above .HTMLBody and adding "& .HTMLBody" to the end of the line. Those simple adjustments fixed it. Bless you sir.
Amazing video but amazing comment though.
Thanks
@@xtremeExcel But now my mail text is not working :(
THANK YOU so much for this! It did work!
Thanks for the video. Is there a way to specify a different outlook signature than than the default? Can we use the name of the signature we gave it when making the signature? If so can I have place holders in the signature, add the signature first an loop back and add excel data in place of place holders? Basically merge dynamic data into a specific outlook signature? I use signatures as templates and manually insert the data I need to use into them depending on the situation. I am hoping to automate these processes.
This is definitely possible. You can have various signatures as templates and overwrite the default signature from mail body with the desired template.
Great video. This works; however, when you replace .Body with .HTMLBody I lose the paragraph breaks I had before. How do I fix this? For example, before you replace .Body with .HTMLBody, you had three different lines in the VBA generated email. Those would now show up as concurrently running sentences?
Hi Kamal,
Your code is great. It really helps me. Now after sending a new mail through this code I want to send a mail again to same email addresses after 3-4 days as a follow up mail, whom I didn’t get the revert in the same email chain/thread after sending first mail. How will I do it? Could you please advise. Thanks
Hello, thank you very much for sharing.
Can we sort, select and delete multiple mails through mail details on excel sheet.
Pls help on this.
Yes, you can
Amazing video. Really helpful. How do I amend the body email text so it does not default to calibri, font size 11? Many thanks
can add one more column? to attach file or all files in folder
Top man. V useful.
How to use the same code to add custom signature which is created in outlook apart from the one which is set to default.
Thank you for this. Just one question, though:
"For i = 9 to Sheet1.Cells(Rows.Count,1).End(xlUp).Row" makes sense but I've always used "Next i" and not just "Next" at the end of the For loop. Can you get away with leaving out the "i" because it's not a nested loop?
including counter with Next is optional. Keeping it in the code makes code more readable. You should use it.
Hi Kamal, thanks for uploading such useful coding material. I have almost watched all of your videos and huge fan of yours now..can you pls help me if I have to send a dynamic table basis a specific criteria to individual mail id's.for ex.. performance of a partner with a body snap shot..count of the partners could be in hundreds
Hi sir
Any video on task scheduler in detail as I am looking for tasks to run automatically at scheduled time which will help me in reducing some man-hours
Thank you really appreciate it !
You're welcome!
Signature was not added to bottom of mail body when pasting an excel range (table for instance). Any thoughts?
can you share your file(having code) please?
Hello kamal, video found useful , however in the body of the mail, i need paste the snapshot along with signature, i tried.display before htmlbody but not able to get, please help me with this
Working. Thank you
Hello Kamal, See in your demo excel you have the differnt body of the email for each Row (i.e in Column C ) you have the body for steve different, kamal differnt and for tema is different - i want to send emails at once with the same macro code with attachements but to add signature converting to .htmlbody will send only one email for at column A - Can u explain how to do add signature as default for all emails run in the Macro .
Excel - column A - "To" ,column B- "CC" column C - "Subject " column D- " Body" Column E- I = "multiple attachments" Column J- Status .
Below is my code .
Option Explicit
Sub Send_Mails()
On Error Resume Next
Dim sh As Worksheet
Set sh = ThisWorkbook.Sheets("Send_Mails")
Dim i As Integer
Dim OA As Object
Dim msg As Object
Set OA = CreateObject("outlook.application")
Dim last_row As Integer
last_row = Application.CountA(sh.Range("A:A"))
For i = 2 To last_row
Set msg = OA.createitem(0)
msg.to = sh.Range("A" & i).Value
msg.cc = sh.Range("B" & i).Value
msg.Subject = sh.Range("C" & i).Value
msg.Body = sh.Range("D" & i).Value
'I need to include signature as default
If sh.Range("E" & i).Value "" Then
msg.attachments.Add sh.Range("E" & i).Value
msg.attachments.Add sh.Range("F" & i).Value
msg.attachments.Add sh.Range("G" & i).Value
msg.attachments.Add sh.Range("H" & i).Value
msg.attachments.Add sh.Range("I" & i).Value
End If
msg.display
sh.Range("J" & i).Value = "Sent"
Next i
MsgBox "All the mails have been sent successfully"
End Sub
Hello,
How would you recommend skipping blank cells?
Hey, thanks , I try to type .HTMLBody but signatute does not appear , I just get error invalid or unqualified reference. Any ideas why?
Please share your file(having code) with me.
Hi,
This is very helpful specially with the signature part.. But what is the code so that you could create multiple emails with signatures.. You changed it on the last part and only made 1 email..
I didn't understand your question. Can you share more details please?
I need a code for sending a multiple mails with filtered excel table is pasted in body of the email. Pls help me with this requirement
Hi Kamal, this video seems to be a solution for one of my automations. But, I am still getting some errors and unable to find the :Microsoft Outlook reference in the VBA. Is it different with Mac ?
Hi Jainish, It could be different for mac. I'll check and let you know.
Signature is not working..could u plz help me😊
Hi ! how to increase the font size of the body of the letter
Hello Sir, I wanted to paste table from excel to mail body and mail it with default outloook signature. Any idea
I'll post a video on this soon.
@@xtremeExcel Hi sir, were you able to create a video regarding his question?
I guess I missed it..
I tried with outlook 2016 and it is showing as Run -time error '429'
ActiveX component cannot can't create object
Quite possible due to many reasons. Do you have admin rights on the machine where you are using the code??
thanks alot mr , how i can coordinate mail body font and style
Either using htmlbody or a template... See other videos of this playlist
Hi sir good morning
It's really good job and I am very helpful on this tutorial
Sir I have two three lines sentence out of that I need change two words for every email how to do that
@Kurban Ali - please share more precise details of your question. Share the code/snippet/input/output etc.
Hi sir I am try to use the same method which one you have shown, I want to send one sentence out of that person name and DOB need to changed for every receptionist
Could you please tell me how to extract email from Outlook with time criteria "9:00pm to 9:00pm"
Hello Sir..in the body part Body 1 = "Number : " .. i want to insert cell A1 value of active sheet..can you please tell me how to provide only one cell range
please share your file(having code)
Can you check your fb messenger sir..I have shared there..
Sure
can yoou tell how to run macro in shared mail folder
Hello sir, I want to send different pdf attachments to different mail ids
Hi Kamal, That's exactly this video explains. Do you have any issue in that?
@@xtremeExcel thank u
Is there any way to split a word document into pdf with different names . Names with first line of the document
Sorry for delayed response. Pdf creation part is explained in this video ua-cam.com/video/tBmSYgZsLwA/v-deo.html
Dear Sir can give us link for file download of how to add signature in vba bulk mail send
Sir can you tell me easiest way to attached PDF multiple files?
Hello friend. Do you want to attach multiple pdf as attachment to one email?
Hi. I hope you're still answering, I tried to auto send .send but I got a debug error
Please share your file(having code) and details to reproduce the issue.
How to add "From" email id in auto sending e-mails. Pl assist.
How to add attachments in mail body . Different Different attachments for different different mails.
put attachment file paths in a separate column for each record. Then you can use .Attachments.add cells(r,c).value to attach the file. [assuming r is iterator for row and c is column having attachment paths]
This is not working when we replace .display with .send, even the mail body is also disappread
@Vinay don't replace .display with .send. Keep .Display there only and later use .Send once body is ready.
@@xtremeExcel I have to send more than 100 emails at one go. So it will be difficult to display the mail first. Hope u got it
Use Application.Screenupdating = False in the beginning and Application.Screenupdating = True in the end.
@@xtremeExcel This is already updated but still not getting signature while using .send
Do you have signature set up in outlook? If yes, send me ur excel file and screenshot of a blank outlook email(create a new mail and take screenshot.).
Hi sir
Could you please let me know how to split the PDF files using VBA Macros
Hello Mubarak, thank u for ur query. I'll soon add a tutorial for this.
Thank you sir
Please update me once you upload the video.
When I do this my signature still doesn't show up?
please share ur file with me.
Make sure you have Ol.Display before Ol.HTMLBody
kishor kakade Kindly share your code for my reference
Don;t have the file handy. But if you have created one, please send over to me and I'll help in fixing the issue.
How do we send from shared mailboxes?
you can use: .SendUsingAccount = OlApp.Session.Accounts.Item(2)
@@xtremeExcel I keep receiving an error.
I packed they syntax under the msg = OA.createitem(0)
The syntax reads
.SendUsingAccount =OIAppSession.Acoounts.Item(2)
its not working :/
please send your file to me with the details of issue.
Sir,pls copy the code in the comments pls
Hi, I followed the code as it is but am getting an error in Sub sendMails() as User- Defined type not defined, can you help?
in the visual basic editor, tools/references/ microsoft outlook XX.X object library must be selected.
Hello Sir, I wanted to paste table from excel to mail body and mail it with default outloook signature. Any idea
Hello Kishor, I am taking up your query as this week's question. I'll post a video on this very soon.
@@xtremeExcel thank you
@@xtremeExcel dear sir
I am waiting for your video
Reminder
ua-cam.com/video/SrkmgLVdI28/v-deo.html