Gruppe
Extern
Problem
An die in Spalte A genannten Email-Adressen sollen die Texte aus Spalte C mit dem Betreff aus Spalte B gesandt werden.
StandardModule: Modul1
Sub SendList()
Dim oOL As Object
Dim oOLMsg As Object
Dim oOLRecip As Object
Dim iRow As Integer
Dim sRec As String, sSub As String, sBody As String
iRow = 2
Set oOL = CreateObject("Outlook.Application")
Do Until IsEmpty(Cells(iRow, 1))
sRec = Cells(iRow, 1).Value
sSub = Cells(iRow, 2).Value
Set oOLMsg = oOL.CreateItem(0)
With oOLMsg
Set oOLRecip = .Recipients.Add(sRec)
.Subject = sSub
.body = Cells(iRow, 3).Value
.Send
oOLRecip.Resolve
End With
iRow = iRow + 1
Loop
Set oOL = Nothing
End Sub