Hi guys!!!!

Need help again in this one.

I have created a program that will e-mail calendar object automatically.

Fine I made it running and its okay but my only 1 tiny problem.

Macro takes too much CPU percentage.

How do I use the timer control in Outlook?

Thanks in advance.

By the way, here's my code:

VB Code:
  1. Sub SMSMeeting()
  2.     Dim SMSApplication As New Outlook.Application
  3.     Dim SMSNS As Outlook.NameSpace
  4.     Dim SMSMailItem As Outlook.MailItem
  5.     Dim SMSCalendarItem As New Redemption.SafeAppointmentItem
  6.     Dim ReminderDate As String
  7.     Dim SMSDate As String
  8.     Dim PauseTime As Integer
  9.     Dim Test As String
  10.     Set SMSNS = SMSApplication.GetNamespace("MAPI")
  11.     Set SMSMailItem = SMSApplication.CreateItem(olMailItem)
  12.     ReminderDate = SMSApplication.Reminders.Item(1).OriginalReminderDate
  13.     SMSDate = DateAdd("h", -1, CDate(ReminderDate))
  14.     PauseTime = 10
  15.     Do While Not Timer >= Timer + PauseTime
  16.         DoEvents
  17.         If Now = SMSDate Then
  18.             SMSMailItem.To = "[email protected]"
  19.             SMSMailItem.Body = "Test mail using program."
  20.             SMSMailItem.Subject = "Test Mail"
  21.             SMSMailItem.Send
  22.         End If
  23.     Loop
  24. End Sub