Excel VBA - Attach (Invoice) PDF to Email and Send to Email Address (Based on Cell Value)

preview_player
Показать описание
Buy the Simple Sheets Invoice Template (all purchases help support this channel)

Download the featured invoice template here

This tutorial is part of a series of tutorials that demonstrate how to create an automated invoice system in Microsoft Excel. This video looks at saving the invoice worksheet as a pdf and then sending it as an attachment via email.

Other videos in this series show you how to write VBA macros that
1) Create the invoice itself
2) Automatically generate the next invoice number
3) Add the invoice details to a record of invoices
4) Save the invoice as an Excel workbook

Table of Contents:

00:00 - Introduction
02:06 - Starting the VBA code for the button
02:52 - Declaring the variables for the macro
05:01 - VBA code to export worksheet as PDF
06:19 - VBA to find the next blank row in the invoice tracker
07:11 - VBA to copy invoice details to the invoice tracker
07:58 - VBA to create a hyperlink to a pdf
08:21 - VBA to create and send email with pdf attached (email address based on cell value)
11:20 - Create a button to run the macro
------------------------
Рекомендации по теме
Комментарии
Автор

A thousand thanks for providing us with this gem of a series. i will also add my small contribution by sharing what i found. For anybody who like me was looking for a way to add a line break to the email body, you can use the special character sequence 'vbCrLf'.

You can also double it or more to increase the space between the lines.

For example :

.Body = "Hello, " & vbCrLf & "Please find attached the document mentioned above." & vbCrLf & vbCrLf & "Best regards."

Hope it works for everybody

aljomanu
Автор

Simply amazing and so easy to follow. Thank you so much for your excellent method of teaching VBA.👍

joedineley
Автор

What a brilliant series. Really well worked out and narrated. Thank you.

polherron
Автор

Great course. Perfect for my small business. Easily understandable method of explaining/teaching. 🎖

karansantra
Автор

Amazing instructions from video 1 to 6! Thank you for your help 😊

vngttcx
Автор

Your an excellent teacher. Thank you!!

jimchamb
Автор

This whole Series was super helpful!

Thank you so much :D xx

pixipui
Автор

Excellent series, thank you so much!!

AndreaHaupt
Автор

Thank you
Mr. Chester,
this video is helped me a lot to sort out my excel sheet and auto mail issue

Evergreen_forever_life
Автор

Thanks for your time. That was very insightful.

SalwaOmar-yfqw
Автор

Thank you for the great videos, this worked perfectly for my invoicing.

davidoverbo
Автор

Thanks so much for all your efforts! This method works even better than some professional softwares in my situation as I can custom and change functions the way I want! Good Job!!

icmhrxx
Автор

Thanks so much! Very easy to follow along

lisay
Автор

I have been looking for ages for a way to attach e mail to invoices, this is really helpful and it works!!! Thank you for your Professional contribution.

nicholasmorgan
Автор

I really want to thank you for your videos. They are awesome! I appreciate it. I was able to apply this to Excel on my Mac.

kgosalvez
Автор

Amazing and helpful content, I have actually created my own out of this series of video

opentrainingcamp
Автор

Thank you very much sir, your lesson was of great benefit to me... Thanks again. i'm from Sri Lanka

leotvlk
Автор

Amazing job! Thank you so much for sharing your knowledge with us!

FOXFIREFIXERSCHANNEL
Автор

Easy, short and straight to the point

JakovLSSJ
Автор

Thank you for this series, you have truly helped me develop an invoice system. I have added features, like to not recording duplicates and ensuring that all important fields are entered before recording or saving the invoice. Something were a bit tough, especially as a mac use, but I managed to make it work accordingly.

fonkong