AW: Default Signatur aus VBA
26.09.2018 16:20:01
Max
Hi Torsten,
Irgendwie will es nicht funktionieren. Also Nein keine Ahnung wo einzubauen, Anbei mein Code... vielen Dank für deine Bemühungen
Sub emailexternalpos()
Dim OutApp As Object
Dim OutMail As Object
'Fügt den Range ein für dein Externen Positionen, welche im Mail ersichtlich sind
Range("A1:M40").CopyPicture xlScreen, xlBitmap
On Error Resume Next
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.getinspector
.To = Cells(7, 4).Value
.Subject = "Text" & Cells(8, 1).Value
signature = OMail.body
.body = "Dear " & Cells(8, 3).Value & "," & vbCrLf & vbCrLf & "Client " & Cells(8, 1).Value & " _
blabla " & signature
.display
SendKeys "~", True
SendKeys "^{END}", True
SendKeys "{ENTER}", True
SendKeys "^v", True
SendKeys "~", True
End With
signature = OutMail.body
On Error GoTo 0
OutApp.Session.Logoff
Set OutMail = Nothing
Set OutApp = Nothing
End Sub