you can send mail by puting the code in workbook open
Private Sub Workbook_Open()
Recipient = "
[email protected]"
subj = "Emergency"
msg = "Dear "
msg = msg & "%0A" & "Your file has been viewed some person "
msg = msg & "%0A" & "Regards"
msg = msg & "%0A" & "name"
HLink = "mailto:" & Recipient
HLink = HLink & "subject=" & subj & "&"
HLink = HLink & "body=" & msg
ActiveWorkbook.FollowHyperlink (HLink)
Application.Wait (Now + TimeValue("0:00:02"))
SendKeys "%s", True
MsgBox "message sent to " & Recipient
End Sub