Habe folgenden Quellcode erstellt.
Dieser funktioniert auch wunderbar.
Aus einer Exceltabelle wird was kopiert und als HTLM-Format im Outlook Body
eingefügt.
Was ich aber noch möchte ist, dass die Signatur mit eingefügt wird. Die erscheint
nämlich nicht. Und zwar sollte die im Outlook hinterlegte Signatur eingefügt werden.
Kann mir hier wer weiterhelfen?
Vielen Dank
Thomas
Sub Senden()
Dim appMail As Object
Set appMail = CreateObject("Outlook.Application").CreateItem(0)
With appMail
.Subject = "Einteilung " & Now
.To = "x; y; z; a; CiG-LH-FFO; b"
.cc = ""
.HTMLbody = GetHtmlBodyText()
.Display
End With
Set appMail = Nothing
End Sub
Private Function GetHtmlBodyText() As String
Dim Wks As Worksheet, Text As String, c As Integer, r As Integer
Set Wks = Sheets(SheetName)
Text = "" & vbCrLf
Text = Text & "" & vbCrLf
Text = Text & "" & vbCrLf
For r = BegZeile To EndZeile
Text = Text & "" & vbCrLf
For c = BegSpalte To EndSpalte
Text = Text & "" & Wks.Cells(r, c) & " " & vbCrLf
Next
Text = Text & " " & vbCrLf
Next
Text = Text & "
" & vbCrLf
'Löschen (Formate bleiben erhalten)
'Wks.Range(DelRange).ClearContents
GetHtmlBodyText = Text
End Function