I have a form that allows the user to 'create' and add multiple attachments to an email that is then sent through outlook.
It all works with one exception, the signature is dropped from the email, can anyone tell me what to add and where in order to use the users default email signature in outlook?
It all works with one exception, the signature is dropped from the email, can anyone tell me what to add and where in order to use the users default email signature in outlook?
Code:
'Collect the message Subject line and body from the form fields
Dim MsgSubject
MsgSubject = Me.Text9
Dim MsgBody
MsgBody = Me.Text3
'Create the email...
Dim olApp As Outlook.Application
Dim olMail As Outlook.MailItem
Dim objOutlookAttach As Outlook.Attachment
Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)
With olMail
.BodyFormat = olFormatHTML
.To = Me.Text11
.CC = ""
.Subject = MsgSubject
.Body = MsgBody
'Add Attachments
Dim db As DAO.Database
Dim rstAttachments As DAO.Recordset
'Set db = CurrentDb()
'Set rstAttachments = db.OpenRecordset("Select TEMPEmailAttachments.FilePath FROM TEMPEmailAttachments;")
If Me.List5.ListCount > 0 Then
Dim varvalue
With Me.List5
For Each varvalue In .ItemsSelected
olMail.Attachments.Add (Me.List5.Column(0, varvalue))
Next
End With
End If
.Save
.Display 'This allows you to preview the message before sending it.
' .Send 'If you want to send without seeing / editing the messages uncomment .Send
End With
Set olMail = Nothing
Set objOutlookAttach = Nothing