PDF Datei per Excel via Outlook senden?

1 Antwort

Schau mal ob dir das vll weiterhilft:

Sub Mailversand()
Dim Nachricht As Object, OutlookApplication As Object
Set OutlookApplication = CreateObject("Outlook.Application")
Dim Anhang As String
Anhang = ThisWorkbook.FullName
Set Nachricht = OutlookApplication.CreateItem(0)
With Nachricht
.To = "mailadresse@domain.tld"
.Subject = "Betreff "
.attachments.Add Anhang
.Body = "Mailtext" & vbCrLf & vbCrLf
.Display
.Mail.Send
End With
Set OutlookApplication = Nothing
Set Nachricht = Nothing
End Sub

https://www.dalecom.de/e-mail-mit-anhang-versenden-uber-vba/

Vermutlich muss in den Einstellungen von Outlook noch die Fernsteuerung via MAPI (Mail Application Programming Interface) freigegeben werden.

1