Sub
PDF_per_EMail()
Dim
strPDF
As
String
Dim
OutlookApp
As
Object
, strEmail
As
Object
Set
OutlookApp = CreateObject(
"Outlook.Application"
)
Set
strEmail = OutlookApp.CreateItem(0)
Tabelle2.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ThisWorkbook.Path &
"/Performance Report.pdf"
, Quality:=xlQualityStandard _
, IncludeDocProperties:=
False
, IgnorePrintAreas:=
False
, OpenAfterPublish _
:=
False
strPDF = ThisWorkbook.Path &
"/Performance Report.pdf"
With
strEmail
.
To
= Range(
"Tabelle1!H2"
)
.BCC = Range(
"Tabelle1!I2"
)
.Subject =
"Performance Report"
.body =
"Text"
.Attachments.Add strPDF
.Display
Kill strPDF
End
With
Set
OutlookApp =
Nothing
Set
strEmail =
Nothing
End
Sub