There are many variations but this will give you the gist of it.
Public Sub SendeMail(oTo, oSub, oMsg As String)
On Error GoTo Err_Send
Dim objOutlook As Outlook.Application
Dim objeMail As Outlook.MailItem
Set objOutlook = CreateObject("Outlook.Application")
Set objeMail = objOutlook.CreateItem(olMailItem)
With objeMail
.Recipients.Add oTo
.Subject = oSub
.BodyFormat = olFormatRichText
.Body = oMsg
.Display ' .Send
'MsgBox " eMail sent to: " & dolookup("[Full Name]", "Users", "[eMail Address] = '" & oTo & "'"), vbInformation, "Outlook eMail"
End With
Exit_Send:
Set objOutlook = Nothing:
Set objeMail = Nothing
Exit Sub
Err_Send:
MsgBox Err.Number & vbLf & Err.Description, vbCritical, "eMail send"
Resume Exit_Send
End Sub
Make sure you have the Object Library loaded into any module in your database (Tools/References/Outlook Object Library)