Here is some code that you can use to test time of day. Insert as I have here:
Code:
Dim StrBody As String
Dim LTime As String
If Time > 0 And Time < #11:59:59 AM# Then
LTime = "Good Morning"
ElseIf Time > #12:00:00 PM# And Time < #6:00:00 PM# Then
LTime = "Good Afternoon"
ElseIf Time > #6:00:00 PM# And Time < #11:59:59 PM# Then
LTime = "Good Evening"
End If
StrBody = LTime & " Mr.abcd... ," & vbCrLf & _
vbCrLf & _
"Pls find the Attached Outstanding Report as on" & " " & FormatDateTime(Date, vbLongDate) & "." & vbCrLf & _
vbCrLf & _
Bookmarks