runtime 2016 nicht installierbar
PeterDoering
Gesendet: 29.03.20 11:02
Betreff: RE: sendobject nicht verfügbar



Extreme Veteran

Beiträge: 563
5002525
Hallo,

Greiff - 26.03.20 13:22
sendobject ist nicht verfügbar
Kunde unzufrieden - kann nicht mehr bestellen. Unser System läuft nicht mehr
und ich habe keine Idee mehr.

Du kannst alternativ selbst die Mails erzeugen, per Outlook Automation. Hier ein Beispiel, um eine bestehende Datei zu verschicken:

Private Const olFolderOutbox = 4
Private Const olMailItem = 0

Sub SendMyMail()
Dim objOL As Object
Dim objConnect As Object
Dim objMail As Object

On Error Resume Next

Set objOL = CreateObject("Outlook.Application")
If objOL Is Nothing Then 'Outlook is not installed, so exit
MsgBox "Could not create an instance of MS Outlook." & vbCrLf & _
"Is Outlook installed properly?", vbExclamation
Exit Sub
End If

On Error Goto 0

Set objMail = objOL.CreateItem(olMailItem)
With objMail
.Recipients.Add "einer@mail.com"
.Recipients.Add "einanderer@mail.com"

.Body = "Sehr geehrte Damen und Herren, (usw.)"
.Subject = "Mein Bericht"

.Attachments.Add "C:\Temp\DeinReport.pdf"
.Attachments.Add "C:\Temp\DeinAndererReport.pdf"
'.Save '...but do not send
'.SaveAs "C:\Temp\mail.txt", 0 'Save to file system as text
.Send

End With
Set objMail = Nothing
Set objOL = Nothing

End Sub

-----
Gruss - Peter
Top of the page Bottom of the page