VBA Unleashed: Send Customized Emails in One Line

preview_player
Показать описание
👉 Ready to master VBA?
(Note: If the download page doesn't work then make sure to turn off any popup blockers)

VBA Unleashed: Send Customized Emails in One Line

In this video, we're going to show you how to send fully customizable emails from VBA (Visual Basic for Applications) with just one line of code.

If you're tired of spending hours configuring VBA email code for each scenario, then this tutorial is for you.

First I cover how to create and configure emails in Excel VBA and then I show you how to do it all in one simple line of code.

#ExcelVBA #VBASendEmail #VBAOutlook

Useful VBA Shortcut Keys
========================

Debugging:
Compile the code: Alt + D + L OR Alt + D + Enter
Run the code from the current sub: F5
Step into the code line by line: F8
Add a breakpoint to pause the code: F9(or click left margin)

Windows:
View the Immediate Window: Ctrl + G
View the Watch Window: Alt + V + H
View the Properties Window: F4
Switch between Excel and the VBA Editor: Alt + F11
View the Project Explorer Window: Ctrl + R

Writing Code:
Search keyword under cursor: Ctrl + F3
Search the word last searched for: F3
Auto complete word: Ctrl + Space
Get the definition of the item under the cursor: Shift + F2
Go to the last cursor position: Ctrl + Shift + F2
Get the current region on a worksheet: Ctrl + Shift + 8(or Ctrl + *)
To move lines of code to the right(Indent): Tab
To move lines of code to the left(Outdent): Shift + Tab
Delete a Line: Ctrl + Y(note: this clears the clipboard)
Рекомендации по теме
Комментарии
Автор

Let me know in the comments if you find the one line method useful for sending emails😀

Excelmacromastery
Автор

Thank you for the great video. I love code that handles multiple options 😀

debbie
Автор

Another amazing video. I send many emails and this function can come in very handy. Thank you for putting it together!

free
Автор

Paul: At 00:47, you add a reference to the Microsoft Outlook 16.0 library. What is the scope of that reference? Just to be clear, is it in force (in memory) just for this VBA module, or is it part of my Excel VBA set-up until I decide to remove it?

Also, can other people use this code if I share the specific Excel file?

Thanks.

houstonvanhoy
Автор

Great video!!! It’s exactly what I was looking for❤

Андрій-фв
Автор

Great video as per! Super clear and logical steps to guide you from one end to the other. Thanks

anthonygeo
Автор

Thank you, off the topic, I watch almost all your videos, I'm looking for advanced filter where the source data is outside of the active workbook. Like code to open the workbook, run the advanced filter and the close the workbook. Thank you for you videos.

sasifexcelsolutions
Автор

Very useful well explained. You got a new subscription

josecarlosconejo
Автор

Been doing this since early 90's for sending quotations proposals and product info etc No more fax machines secretaries etc could prepare and send a quote in 30 seconds.

rods
Автор

Excellent. Another great lesson. Thank you Paul ❤❤❤. Request for the next lesson “Sending Whatsapp masssages using VBA”. 😁

budiyanto
Автор

hi sir hope your doing well, Thanks for your contribution in excel vba learing, I have a question when the email send by vba how can i check if the email is not delivered or not without opening outlook by code at the specified email address.

abdulrehmanmughal
Автор

Hi. Quick question. How could one use a better code editor for vba? Is it possible to use Vscode somehow?

iiiiii-wh
Автор

Do you have a solution for using an other "from email" ? I don't think that works good anymore with Office365 and outlook.

MegaJohny
Автор

Thanks for your videos, Paul! 😊 Can I ask you a question? Is your main full time job VBA coding? If so, what kind of job is it? I was wondering If one can still get a job as a VBA developer

Denial
Автор

Very nice video and code. Will likely be using the code in the helper module in the future.
With some error handling when adding the attachments, that seems to be the most likely point of failure, it seems to be very close to ready to use.
I will probably integrate also your solution to add charts without using the Clipboard, and make sure to credit you on all the code!

pbs
Автор

Using the same approach as you have in this video, are you aware of a good way to pass through a graph object to the send email function so that the graph is included in the body? I cannot find any good support for it so end up copy/pasting the graph which then ties up the clipboard (which I want to use for hyperlinks since passing through an array destroys them..)
Great video!

Drzeny
Автор

Have you already explained all the principles of object-oriented programming, such as inheritance, encapsulation, abstraction, and polymorphism, through building applications to understand these concepts?

hammeedabdo.
Автор

Hello, I can't add outlook signature to my excel VBA

Could you provide me a solution about it?

Thanks

AlihanOZan
Автор

All I had to do was move the .Display and use the .HTMLBody?? I researched forever to try to get my signature to be included....

I am experiencing a weird bug, though. I am adding an html span tag to specify my typeface and size since it won't use Outlook's default for some reason, but I can't set the size to 12....I tried 16px and 12pt, but those come out as 10. All other values of px and pt correctly translate as expected....I'm losing my mind with this bug, lol. 11.5pt yields 11.5, 13pt yield 13, but 12pt yields 10. 18px yield 13.5, 14px yields 10.5, but 16px yields lol

twiddle
Автор

Hi you're very professional, but your speed of teaching is too fast, and explanations are not enough. Please, I want to learn more from you and want you to be as understandable as possible. From Senegal, a country of africa

ousmanetall