eg OL Code...set as module in Outlook VBA
Sub mail_book()
If Hour(Now()) = 10 Then
Dim aOutlook As Outlook.Application, aEmail As Outlook.MailItem
Set aOutlook = GetObject(, "Outlook.Application")
Set aEmail = aOutlook.CreateItem(olMailItem)
aEmail.Importance = olImportanceHigh
aEmail.Subject = "First ABT Reminder For - Dated " & Today
aEmail.Body = "This is a Test"
aEmail.Recipients.Add "j.logss@loggsville.com"
aEmail.Attachments.Add ("C:\MrE\1.xls")
On Error GoTo ErrorHandler
aEmail.Send
Exit Sub
ErrorHandler:
Set aEmail = aOutlook.CreateItem(olMailItem)
aEmail.Importance = olImportanceHigh
aEmail.Subject = "ABT Alert Error For Ee - Dated " & Date
aEmail.Recipients.Add "j.bloggs@bloggs.com"
aEmail.Send
Resume Next
End If
End Sub