Attachments.Add findet Datei nicht
18.11.2015 09:11:10
Christoph
Wenn ich die Email versenden möchte, sagt er mit die ganze zeit, das er die Dateí nicht finden. Wisst ihr wieso?
Private Sub cmdMail_Click()
Dim Mailadresse As String, Betreff As String
Dim olApp As Object
Set olApp = CreateObject("Outlook.Application")
Mailadresse = "MAIL"
' CC = "CC"
Betreff = "" & " - " & Tabelle9.Cells(4, 6) & " - " & Tabelle9.Cells(15, 7)
Textinhalt = ""
Tabelle9.Range("A1:J55").ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\c\Desktop\" & "S" & " - " & Tabelle9.Cells(4, 6) & " - " & Tabelle9.Cells(15, _
7), Quality _
:=xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False _
, OpenAfterPublish:=False
With olApp.CreateItem(0)
.to = Mailadresse
' .CC = CC
.Subject = Betreff
.Attachments.Add ("C:\Users\c\Desktop\" & "S" & " - " & Tabelle9.Cells(4, 6) & " - " & _
Tabelle9.Cells(15, 7))
.Body = Textinhalt
.Display
End With
Set olApp = Nothing
End Sub
Vielen Dank schonmal!