Textbaustein in html formatieren
07.09.2017 14:37:35
Nordwestler
wegen der Signatur bin ich von .Body auf .htmlBody umgestiegen. Wie kann ich jetzt die aus Zellen ausgelesenen Texte - Anrede (Cells(10, 4)) und Textbausteine (Cells(8, 4) & Cells(9, 4)) - schlicht in Arial 10 formatieren - ganz ohne fett ud kursiv und färben?
Set Nachricht = OutApp.CreateItem(0)
With Nachricht
' Outlook Signatur aktivieren
.GetInspector.Display
strSignatur = .HTMLBody
'Empfängeradressen holen aus Zeile 2, Spalte 5 (=E) usw.
.To = Cells(11, 4) & ";" & Cells(12, 4)
.Cc = Cells(13, 4) & ";" & Cells(14, 4)
'Betreff holen
.Subject = Cells(7, 4)
' Textblock: Anrede aus Zeile 2; Spalte 10 (=J), Textbaustein 1 & 2; Signatur
.HTMLBody = Cells(10, 4) & vbCrLf & vbCrLf & Cells(8, 4) & vbCrLf & vbCrLf & Cells(9, 4) & strSignatur
'Anlage aktivieren
.Attachments.Add strAttachmentPfad1
.Attachments.Add strAttachmentPfad2
.Attachments.Add strAttachmentPfad3
'Mail anzeigen vor Versand
.Display
Gibt es dafür eine schnelle Lösung? Die Recherche zeigt meist ziemlich komplexe Formatierungscodes.
Viele Grüße
Reinhard
Anzeige