Sub
Excel_Workbook_via_Outlook_Senden()
Dim
olApp
As
Object
Dim
AWS
As
String
, olOldBody
As
String
, strName
As
String
strName = Sheets(
"Readme_GER"
).Range(
"B24"
) &
" im Objekt "
& Sheets(
"Readme_GER"
).Range(
"B27"
) &
" von "
& Sheets(
"Readme_GER"
).Range(
"B21"
)
AWS = ActiveWorkbook.Path &
"\" & "
Bestellung zum Auftrag am " & strName & _
Mid(ActiveWorkbook.Name, InStrRev(ActiveWorkbook.Name,
"."
))
ActiveWorkbook.SaveCopyAs AWS
Set
olApp = CreateObject(
"Outlook.Application"
)
With
olApp.CreateItem(0)
.GetInspector.Display
olOldBody = .htmlBody
.
To
=
"p0050001689@xxx.com"
.Subject =
"Bestellung zum Auftrag am "
& strName
.htmlBody = "Sehr geehrte Damen und Herren,
" & _
"im Anhang sende ich Ihnen die Bestellbestätigung zum Auftrag am "
& strName &
"."
& _
"
Mit freundlichen Grüßen,
"
.Attachments.Add AWS
End
With
Kill AWS
End
Sub