I am building a mailshot database using Access - this will allow users to send a personalised mailshot (Dear John, Dear Paul etc.) with an attachment & with an RTF signature block (really keen not to use am HTML one as the pictures never seem to come out)
I haven't started on the personalisation piece (which will be a simple rst) but have managed to add the signature block & attachment to the email. However I cannot add the content of the email (which comes from a Rich Text formatted field [email_body].
I think the adding of the RTF signature block somehow clashes with the formatting of [email_body] so that bit doesn't get added.
Below is the code I am using - can anyone help?
Private Sub SendMail_Click()
Dim OutApp As Object
Dim OutMail As Object
' create content Strings
Dim BodyString As String
Dim DefaultSignatureString As String
Dim Signature As String
Dim AttachmentString As String
Dim SubjectLine As String
SubjectLine = Me.Subject_Line
AttachmentString = Me.Attachment
BodyString = Me.Email_Body
DefaultSignatureString = Me.Email_Signature
If Dir(DefaultSignatureString) <> "" Then
Signature = GetBoiler(DefaultSignatureString)
Signature = ""
'Create Outlook Session
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
.To = "firstname.lastname@example.org"
.CC = ""
.BCC = ""
.Subject = SubjectLine
.RTFBody = BodyString & "<br>" & Signature
.Send 'or use .Display
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing