I was sent this question today and I found it very interesting
I need a macro be sent a specific sheet in a workbook to an email address in a
cell let say a one on the same sheet is there any video that you can solve this
I don't have a video that can solve this but I decided I'd make one what I've
done here is I have basically the basic template that they have for available to
you for invoices so I figured that this would be a good example of of something
that you would send send by email okay so I have the invoice which I just
picked out of my head right there invoice number there and I have the
email address here we're gonna do is I will include this in the description
send it sending invoice by email and I've set he addresses string subject to
string messages string file name is string is object Outlook mail is object
attachment is object path a string dim as strange and set outlook app create
outlook applications set my Outlook mail item to Outlook app create item said my
email or set my attachments equals Outlook mail item dart attachments in
path I've showed you how to do this before you just go and you copy where
you want to have this file sent and then you put it here and put it in quotation
marks and don't forget to put your ending backslash there and then
quotation marks application display alerts equals false email address equals
the sheet 1 cells (8, 2) so I have the email address right there so so that's
column a B right so that's 8 2 and then I have the file name as is the invoice
name number and that is 5 5 3 and then I called the file name it's the values but
I'm going to call it dot PDF so I've added the dark
so that we had to have the name and this subject name is the invoice number so
I'm saying with active sheet export file as PDF file name so it's the path and
the filename and then we have quality equals quality standard include
properties equals true ignore print areas equals false and after published
open after publishing is false okay attachment equals path and file name
Outlook mail item to equals e address I have no CC I have no blind CC the
subject I have put up here as the invoice number Outlook mail item body
this as please find your invoice attached and best regards my my
attachments add the attachment outlook item display Outlook mail item send
application display alerts truth set outlook app to nothing and set Outlook
mail to nothing and then in sub so let's just a page through this and it should
go along pretty nicely
so just where my was here a second or so here is my outlook so I we have it to an
email address the subject is the invoice number
I had my invoice number attached here and let's finish going through the code
and then basically you keep going through here and it will send it off and
your happy camper now and then in sub so that's how how you send a specular sheet
from the email address you save this sheet as a PDF and you send it as an
attachment to the email address on the on the page please subscribe