Similar Posts

VBA Code to Find Last Column or Row of a Sheet
VBA Code to Find Last used Column or Row in Excel Sometimes as a developer, you need to take actions in Excel sheets based on last row or column. In Excel, there are two kinds…

VBA Code to Delete File
In this article we are going to show you how you can delete file or files using a single line of VBA code. 1. Delete a specific file from the folder, 2. Delete specific type of files from the folder, 3. Delete all files from the folder

Write Your First Macro in Excel
Learn how to write your first VBA macro in Excel to automate repetitive formatting tasks across multiple worksheets. This beginner-friendly guide will walk you through the process step-by-step, from recording your actions to customizing the code for your specific needs.

VBA Code to Get User Name
This Excel VBA Code helps to Get User Name. Here is an example environ(username) or Application.username.This macro gets the username from active directory.

VBA Code to Delete All Shapes On A Excel Sheet
VBA Code To Delete All Shapes On A Excel sheet Here is a VBA code which deletes all the shapes from an Excel sheet. Code is simple but you have to be bit careful while…

VBA Tool to Merge Excel Files from a Folder
Merge Excel Files From last few months, we have been receiving frequent requests from users for a VBA tool which can consolidate Excel files from a folder. So here we come with one more free…

VBA Code to Find Last Column or Row of a Sheet
VBA Code to Find Last used Column or Row in Excel Sometimes as a developer, you need to take actions in Excel sheets based on last row or column. In Excel, there are two kinds…

VBA Code to Delete File
In this article we are going to show you how you can delete file or files using a single line of VBA code. 1. Delete a specific file from the folder, 2. Delete specific type of files from the folder, 3. Delete all files from the folder

Write Your First Macro in Excel
Learn how to write your first VBA macro in Excel to automate repetitive formatting tasks across multiple worksheets. This beginner-friendly guide will walk you through the process step-by-step, from recording your actions to customizing the code for your specific needs.

VBA Code to Get User Name
This Excel VBA Code helps to Get User Name. Here is an example environ(username) or Application.username.This macro gets the username from active directory.

VBA Code to Delete All Shapes On A Excel Sheet
VBA Code To Delete All Shapes On A Excel sheet Here is a VBA code which deletes all the shapes from an Excel sheet. Code is simple but you have to be bit careful while…

VBA Tool to Merge Excel Files from a Folder
Merge Excel Files From last few months, we have been receiving frequent requests from users for a VBA tool which can consolidate Excel files from a folder. So here we come with one more free…

VBA Code to Find Last Column or Row of a Sheet
VBA Code to Find Last used Column or Row in Excel Sometimes as a developer, you need to take actions in Excel sheets based on last row or column. In Excel, there are two kinds…

VBA Code to Delete File
In this article we are going to show you how you can delete file or files using a single line of VBA code. 1. Delete a specific file from the folder, 2. Delete specific type of files from the folder, 3. Delete all files from the folder

Write Your First Macro in Excel
Learn how to write your first VBA macro in Excel to automate repetitive formatting tasks across multiple worksheets. This beginner-friendly guide will walk you through the process step-by-step, from recording your actions to customizing the code for your specific needs.

VBA Code to Get User Name
This Excel VBA Code helps to Get User Name. Here is an example environ(username) or Application.username.This macro gets the username from active directory.

VBA Code to Delete All Shapes On A Excel Sheet
VBA Code To Delete All Shapes On A Excel sheet Here is a VBA code which deletes all the shapes from an Excel sheet. Code is simple but you have to be bit careful while…

VBA Tool to Merge Excel Files from a Folder
Merge Excel Files From last few months, we have been receiving frequent requests from users for a VBA tool which can consolidate Excel files from a folder. So here we come with one more free…
How can I reference a table I want to add in email body? Lets say for example I want a table (with matched formatting) in between this is a test email 1 and thanks?
Also how would you go about including a signature?
Thanks!
Thanks Sam for highlighting your challenge. This seems a customized requirement. We are currently working on VBA Utilities which will be available under Tools and Templates Section soon. Hope that will help your needs.
If you are looking to hire a VBA expert to complete your project, you may submit your project details at https://excelsirji.com/hire-us/ and we will get back to you in 48 hours with details.
Happy Reading
Your Excel mate
Great News Sam,
We have created a utility tool as you asked. You may get the same from below link:
https://products.excelsirji.com/downloads/outlook-bulk-email-tool/
Please let us know your valuable feedback.
Regards
Excel Mate
Thank you for publishing this example. Everything works great in my environment, with one exception. When I send the draft e-mail, the e-mail is bounced because my company domain was attached to the e-mail address pulled from the spreadsheet. For example, from my spreadsheet the email address joe@domain.net is being sent to joe@domain.net@mycompany.com. If I manually type the email address or even copy/paste from Excel into Outlook, it displays exactly the same in Outlook as the one populated from Excel but those are sent correctly. Any idea why? Thanks again!
Hi Marty,
Please accept our apologies for delayed response.
The issue explained by you seems to be caused due to mailto tag available in To (Column A) and Cc (Column B) in the sheet. Please ensure that email id mentioned in the Excel sheet is plain text and no hyperlink or mailto tag is attached to it.
Regards,
Your Excel Mate
Hi,
Thanks for the code.
I need to attach multiple files based on partial filename within the same folder.
Can you please kindly how can I achieve that using above draft email outlook code.
Thanks in advance.
Hi Shiva,
You can try below code where new variable named strBaseFolderPath has been added to define base folder path where attachments are saved:
Note that this code does not attach multiple files in one email instead only one attachment can be added per email.
You can also have a look at https://products.excelsirji.com/downloads/outlook-bulk-email-tool/. Though it also does not support multiple attachments per email but we can customize it for you.
Regards
ExcelSirJi Team
It runs and says “done” but there is no draft email popping up or in the outlook email box. I have Microsoft Outlook 16.0 Object Library added in reference.
Could you please check “Draft” folder in your outlook. It should show there. Thanks
Hi Sir,
Thnks a lot for the above. Works well.
However, lets say the word “test” in email body should be Bold, i have it as bold in the excel sheet but when the mails are drafted it does not appear as bold. Is there a way to solve this?
Best,
Hi Domah,
It may not be simple but let me suggest you have way out.
First replace the code
objMail.Body = Sheet1.Range("D" & lCounter).Value
withobjMail.HTMLBody = Sheet1.Range("D" & lCounter).Value
Then write email body in Excel in HTML format, something like below:
Hi,
This is a <b>test</b> email 1.
Thanks
Note that there is a bold tag added for test word.
Then run the code, it should work.
Thanks & Regards,
ExcelSirJi Team
Hello,
I copied this code tried to Run but I didnt find this Excel sheet to fill details For To,cc etc. Can u plz guide on this.
If possible please share Macro to if not possible then pl guide here how can I do this?
Hi Prakash,
You can have a look at Outlook Bulk Email Tool.
https://products.excelsirji.com/downloads/outlook-bulk-email-tool/
Regards,
ExcelSirJi
Hi I tried using the above VBA code to automatically create draft mail, but all the time only blank mails are formed please help
There could be 2 reasons for this:
Hope this would solve your problem.
HI,
I tried what you have written, but event though, all mail attributes are right, then also my emails, to , cc , subject, body,, still everything is empty
please help
I will share a video this week on the same on my YouTube channel. Hope that may help.
Nice post. I learn something totally new and challenging on websites
Great. Keep Learning
Hi! Thank you for the code. May I have an additional code to the existing that includes a table on the body? Thank you.
Hi Cles,
You may refer to Outlook Bulk Email Tool for the ready made solution. If you are just looking for a code to add table on the email body then you can refer VBA Code to Convert Excel Range into HTML Table post.
Regards,
ExcelSirJi Team
Hi. Thank you very nice artichle. like admin
Thank you so much for your comment. it really inspires us.
I’m waiting for more content. This was very good.
Thank you mate.