VBA Makro Email Signatur
10.11.2014 11:21:58
Max
ich versuche ein Makro zu schreiben das Automatisch eine Email an einen Verteiler (Excel Tabelle) sendet, einen Gewissen Betreff und Text enthält sowie eine Datei in Anhang hat. Das funktioniert soweit. Nun würde ich gerne Meine Standard Outlook Signatur benutzen, das funktioniert aber anscheinend nicht mehr sobald man mit dem Befehl .Body = "TEXT" den Inhalt der Mail angibt. Weiß jemand eine Lösung?
Sub CreateMail()
Dim objOutlook As Object
Dim objMail As Object
Dim rngEntry As Range
Dim rngEntries As Range
Set objOutlook = CreateObject("Outlook.Application")
Set rngEntries = ThisWorkbook.Sheets(2).Range("B1:D1") 'AE
For Each rngEntry In rngEntries
Set objMail = objOutlook.CreateItem(0)
With objMail
.To = rngEntry.Offset(1, 0).Value
.CC = rngEntry.Offset(2, 0).Value
.Subject = rngEntry.Offset(3, 0).Value
.Body = rngEntry.Offset(4, 0).Value
.Attachments.Add rngEntry.Offset(5, 0).Value
.Display '.Send or .Save
End With
Next rngEntry
Set objOutlook = Nothing
Set objMail = Nothing
Set rngEntry = Nothing
Set rngEntries = Nothing
End Sub
Anzeige