hat jemand zufällig einen VBA-Code, der eine eine Excel-Mappe in pdf umwandelt und dann diese erstellte pdf-Datei automatisch per Outlook an vorgegebene Empfänger versendet.
Gruß, jensP
On Error GoTo mailzeigen
Dim olApp As Object
Dim olMailItm As Object
Dim i, k As Integer
lz = Cells(Rows.Count, 1).End(xlUp).Row
i = 2
weiter:
Do Until i > lz
Set olApp = CreateObject("Outlook.Application")
Set olMailItm = olApp.CreateItem(0)
With olMailItm
.To = "test@test.de" ' Empfänger eingeben
.Subject = "Betreffzeile"
.Body = "Hallo Frau/Herr Test," & Chr(13) & Chr(13) & "anbei die datei... "
.ReadReceiptRequested = True
.Attachments.Add "C:\My Folder\Printout\"Testdate.pdf" 'ggf. anpassen
.Send
End With
End If
Set olMailItm = Nothing
Set olApp = Nothing
End If
End With
Set olMailItm = Nothing
Set olApp = Nothing
Resume Next
GoTo weiter
Ich hoffe dir geholfen zu haben....