Makro Start erst ab Zeile 5
01.06.2023 09:42:01
Samuel
Hallo zusammen
Kann mir jemand beim coding unten so abändern, dass es erst ab Zeile 5 startet?
Sub Zahlungbestätigung_Direkt()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim count, i As Integer
count = WorksheetFunction.CountA(Range("A1", Range("A1").End(xlDown)))
i = 1
Do While i = count
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.Createitem(0)
strbody = "" & _
"
Guten Tag " & _
On Error Resume Next
With OutMail
.SentOnBehalfOfName = ("")
.to = Sheets("Aktuelle_Zahlungen").Cells(i, 1).Text
.CC = ""
.BCC = ""
.Subject = "Zahlungsbestätigung" Sheets("Aktuelle_Zahlungen").Cells(i, 2).Text
.HTMLBody = strbody _
& .HTMLBody
.Send
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
i = i + 1
Loop
End Sub
Gruss
Samuel