Ich möchte mit folgendem Code ein Mail an meherere Empfänger senden, wie geht das?
Frage = MsgBox("Benachrichtigung über aktualisierung der Auswertung senden?", vbQuestion + vbYesNo, "F.F.Excelsystem") End Sub
Sub Mail_ZP16()
Dim Frage
If Frage = vbNo Then Exit Sub
Application.ScreenUpdating = False
Application.DisplayStatusBar = True
bolStatusBar = Application.DisplayStatusBar
Set objOutlook = CreateObject("Outlook.Application")
Benutzername
strRecipient = "ZP16 Verteilerliste" ' (In Outlook angelegte Verteilerliste)
strfile = "Guten Tag! Die Auswertung der Produktionskennzahlen ist wieder aktuell! MfG " & Benutzer
Application.StatusBar = "Sende Datei " & strfile & " an " & strRecipient
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(strRecipient)
objOutlookRecip.Type = olTo
.Subject = "Produktionskennzahlen"
.Body = strfile
objOutlookRecip.Resolve
.Send
End With
Set objOutlook = Nothing
Application.StatusBar = False
Application.DisplayStatusBar = bolStatusBar
MsgBox "Nachricht wurde gesendet!"
Danke für jede Hilfe