Public Sub SendOutlookMail(Subject As String, Recipient As _
String, Message As String)
On Error GoTo errorHandler
Dim oLapp As Object
Dim oItem As Object
Set oLapp = CreateObject("Outlook.application")
Set oItem = oLapp.createitem(0)
With oItem
.Subject = Subject
.To = Recipient
.body = Message
.Send
End With
Set oLapp = Nothing
Set oItem = Nothing
Exit Sub
errorHandler:
Set oLapp = Nothing
Set oItem = Nothing
Exit Sub
End Sub