Hallo zusammen,
ich arbeite momentan an einem E-Mail Verteiler in Excel in Verbindung mit VB. Ich habe mir 2 Mappen angelegt und in der einen Mappe möchte ich den Serienbrief schreiben und die andere Mappe Verwaltet die Adressen mit Anrede und Nachname.
Nun zu meinem Problem, ich möchte die Formatierungen übernehmen wenn ich den Body der Email erstelle, nur fehlts mir an ner Idee wie.
derzeitiges Makro:
Sub verteilen()
Dim oOL As Object
Dim oOLMsg As Object
Dim oOLRecip As Object
Dim oOLAttach As Object
Dim iRow As Integer, iCounter As Integer
Dim sFile As String, sRec As String, sSub As String
Dim sBody As String
Dim bln
Application.ScreenUpdating = False
Application.DisplayStatusBar = True
bln = Application.DisplayStatusBar
Set oOL = CreateObject(„Outlook.application“) 'Outlook Fenster öffnen
For iCounter = 39 To 400
If Cells(iCounter, 1) = „“ Then
Exit For
End If
sRec = Cells(iCounter, 3) 'E-Mail Adresse: Zelle (Zeile, Spalte)
'================================================================
sSub = Cells(1, 2) 'Betreff
'================================================================
sBody = „“ 'Text
For i = 3 To 37
sBody = sBody & Cells(i, 2) & vbCr
Next i
'================================================================
Application.StatusBar = "Sende E-Mail an " & sRec
Set oOLMsg = oOL.CreateItem(0)
With oOLMsg
.To = sRec
.Subject = sSub
.Body = sBody
.send
End With
Next iCounter
Set oOL = Nothing
Application.ScreenUpdating = False
Application.DisplayStatusBar = bln
End Sub