1

I want to send emails from Access with VBA. The emails should have the signature from the Outlook account.

If I transfer the body, then there is no signature.

If I don't specify a body, then the signature is in the email.

With objOutlookMsg
    Set objOutlookRecip = .Recipients.Add("test@web.de")
    objOutlookRecip.Type = olTo

    .Subject = "Verwaltungsgebühr "
    .Body = Anredeemail & vbCrLf & vbCrLf & "anbei erhalten Sie unsere Verwaltungskostenrechnung." & vbCrLf & vbCrLf & "Mit freundlichen Grüßen" & vbCrLf & vbCrLf & ""
    .Importance = olImportanceNormal
    .Attachments.Add strDatei
    .Send
End With
Andreas Violaris
  • 2,465
  • 5
  • 13
  • 26
  • Does this answer your question? [How to add default signature in Outlook](https://stackoverflow.com/questions/8994116/how-to-add-default-signature-in-outlook) – niton Mar 07 '23 at 15:02

1 Answers1

0

I have seen code for at least 2 methods but this is the only one I can get to work. Don't ask me to explain the HTML tag code, I found it.

strBody = "message"
.BodyFormat = olFormatHTML
.Display
'following allows including Outlook email signature, however, must Display before Send
.HTMLBody = Replace(.HTMLBody, "<div class=WordSection1><p class=MsoNormal><o:p>", "<div class=WordSection1><p class=MsoNormal><o:p>" & strBody)
.Send
June7
  • 19,874
  • 8
  • 24
  • 34