Option Explicit
Private Sub CommandButton1_Click()
On Error GoTo ErrHandler
Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application")
Dim objEmail As Object
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
.to = "webadmin@encodedna.com"
.Subject = "This is a test message from Arun Banik"
.Body = "Hi there"
.Display
End With
Set objEmail = Nothing: Set objOutlook = Nothing
ErrHandler:
End Sub