Signatur unter E-Mail
04.03.2022 11:38:32
Björn
habe da mal ein Problem
Ich möchte von einer Exel Seite eine E-Mail verschicken mit meiner Signatur.
Ich kopiere die Seite und füge Sie als Bild in die E-Mail ein.
Das geht soweit aber nicht die Signatur.
Ich weis nicht wo ich den Fehler mache.
Hier der Auszug des VBA was mit jeder Exel Tabelle geht.
Über hilfe wäre ich dankbar
Der HTML Body wird nicht richtig angezeigt
" .htmlbody = "Hello,
Aktueller Status test
" & "
" & "" " dort sind Zeilenumbrüche drin
Sub sendMail()
Dim TempFilePath As String
Dim xOutApp As Object
Dim xOutMail As Object
Dim xHTMLBody As String
Dim olDummy As String
Dim xRg As Range
On Error Resume Next
Worksheets("Auswertung").Activate
Set xRg = Range("A1:K76")
With Application
.Calculation = xlManual
.ScreenUpdating = False
.EnableEvents = False
End With
Set xOutApp = CreateObject("outlook.application")
Set xOutMail = xOutApp.CreateItem(olMailItem)
Call createJpg(ActiveSheet.Name, xRg.Address, "DashboardFile")
TempFilePath = Environ$("temp") & "\"
With xOutMail
.getinspector.Display
Debug.Print .body
.htmlbody = .body
Set .SendUsingAccount = .Session.Accounts.Item("Extern")
.Display
.Subject = "Status Shell_CH_SSF für die 8 Uhr Runde"
.Attachments.Add TempFilePath & "DashboardFile.jpg", olByValue
Debug.Print .htmlbody
.to = "Test@e-Mal.com"
.htmlbody = "Hello,
Aktueller Status test
" & "
" & ""
End With
End Sub