Загрузка...

Send Copy of sheet to the email address indicated on the sheet

Save excel as Pdf and send as an email attachment
Send sheet to the email address indicated on the sheet
Save as a pdf and add as an attachment to email

Sub sendinvoicebyemail()
Dim edress As String
Dim subj As String
Dim message As String
Dim filename As String
Dim outlookapp As Object
Dim outlookmailitem As Object
Dim myAttachments As Object
Dim path As String
Dim attachment As String

Set outlookapp = CreateObject("Outlook.Application")
Set outlookmailitem = outlookapp.createitem(0)
Set myAttachments = outlookmailitem.Attachments

path = "C:\Users\Barb\Documents\statements\"
Application.DisplayAlerts = False
edress = Sheet1.Cells(8, 2)
filename = Sheet1.Cells(3, 5).Value & ".pdf"
subj = Sheet1.Cells(3, 5)

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:= _
path + filename, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False


attachment = path + filename

outlookmailitem.To = edress
outlookmailitem.cc = ""
outlookmailitem.bcc = ""
outlookmailitem.Subject = subj
outlookmailitem.body = "Please find your invoice attached" & vbCrLf & "Best Regards"


myAttachments.Add (attachment)
outlookmailitem.display
outlookmailitem.send
Application.DisplayAlerts = True

Set outlookapp = Nothing
Set outlookmailitem = Nothing


End Sub

For more help visit my website http://www.easyexcelanswers.com or email me at easyexcelanswers@gmail.com

I am able to provide online help on your computer for a reasonable rate.

MY videos are all created on Camtasia.
http://send.onenetworkdirect.net/z/582993/CD237560/
Follow me on Facebook
https://www.facebook.com/easyexcel.answers

Видео Send Copy of sheet to the email address indicated on the sheet канала Barb Henderson
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять