Text in Outlookmail formatieren
04.03.2008 11:17:00
StingerMKO
Ich möchte mit Excel eine Outlookmail erstellen und versenden.
Das klappt auch alles soweit ganz gut, allerdings übernimmt Outlook keine Textformatierungen
aus Excel.
Beispiel: der erste Text im Body soll Standard Arial 10 sein, die Signatur darunter, die ich in einer
Extra Variablen speichere, soll Arial 8 sein.
betreff = Cells(5, 5)
Set OutApp = CreateObject("Outlook.Application")
Set Nachricht = OutApp.CreateItem(0)
mailadresse = Cells(i, 1)
anrede1 = Cells(i, 2)
anrede2 = Cells(i, 3)
With Nachricht
.To = Cells(i, 1) 'Adresse
.Subject = betreff 'Betreffzeile
.body = Cells(6,6) '--- Hier steht der Nachrichtentext
.body = Nachricht.body & Cells(6,7) '---- Hier steht die Signatur, soll andere Formatierung haben
End With
Nachricht.Display
SendKeys "%s"
Set OutApp = Nothing 'CreateObject("Outlook.Application")
Set Nachricht = Nothing 'OutApp.CreateItem(0)
Application.Wait (Now + TimeValue("0:00:05"))
Vielen Dank im Voraus!
Viele Grüße,
Malte