Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending a scheduled email in Oulook XP using VBA

Status
Not open for further replies.

jarvis01

Technical User
Jul 18, 2003
1
GB
Guys Please can you help, im trying to send an automatic email message using VBA - in debug mode the step through works ok, but the timer function i have written does not seem to be called - have i done something wrong?? Here is the code i've written

Thanks

jarvis

Option Explicit

Dim nextTimeCheck As Date


Sub Auto_Open()
Check_Time
On Error Resume Next
End Sub

Sub Check_Time()
On Error Resume Next
If TimeValue(Now()) = TimeValue(&quot;15:11:00&quot;) And TimeValue(Now()) < TimeValue(&quot;15:12:00&quot;) Then

ThisOutlookSession.Email

End If

nextTimeCheck = Now + TimeValue(&quot;00:00:30&quot;)
Application.OnTime EarliestTime:=nextTimeCheck, Procedure:=&quot;Check_Time&quot;
Auto_Open
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top