irgendwie bekomme ich es nicht hin, das alle Empfänger als Spalte A ausgelesen werden sollen und die die im CC steheen sollten aus Spalte B ausgelesen werden...
Könnte mir da einer kurz weiterhelfen?
Sub Try_CC()
'Setting up the Excel variables.
Dim olApp As Object
Dim olMailItm As Object
Dim iCounter As Integer
Dim iiCounter As Integer
Dim Dest As Variant
Dim SDest As String
Dim SSDest As String
'Create the Outlook application and the empty email.
Set olApp = CreateObject("Outlook.Application")
Set olMailItm = olApp.CreateItem(0)
'Using the email, add multiple recipients, using a list of addresses in column A.
Worksheets("sheet1").Activate
With olMailItm
SDest = ""
For iCounter = 1 To WorksheetFunction.CountA(Columns(1))
If SDest = "" Then
SDest = Cells(iCounter, 1).Value
Else
SDest = SDest & ";" & Cells(iCounter, 1).Value
End If
Next iCounter
'Using the email, add multiple recipients, using a list of addresses in column A.
Worksheets("sheet1").Activate
SSDest = ""
For iCounter = 1 To WorksheetFunction.CountA(Columns(1))
If SSDest = "" Then
SSDest = Cells(iCounter, 1).Value
Else
SSDest = SSDest & ";" & Cells(iCounter, 1).Value
End If
Next iCounter
'Do additional formatting on the BCC and Subject lines, add the body text from the _
spreadsheet, and send.
.To = SDest
.cc = SSDest
.Subject = "FYI"
.HTMLBody = "Hallo Meine Damen und Herren, ich wünsche Ihnen einen wunderschönen Guten _
_
_
Abend!" & .HTMLBody
.Display
End With
'Clean up the Outlook application.
Set olMailItm = Nothing
Set olApp = Nothing
End Sub
Vielen Dank