StartDownloadsServiceSamplesWorkshopsContact DeutschEnglish
 
Samples
General
Outlook®
 
Awarded by
Microsoft since 2005:
mvp logo
VBOffice Info
Visitors1803918
Impressions6757720
Links
Imprint
Privacy Policy
Contact
E-Mail: Send daily
Author: Michael BauerHomepage
Date: 19.01.2006Accessed: 54246
  
Description

Do you have to send an email every day at the same time? You can use a Reminder to achieve that.

Create a TaskItem with a unique subject and determine the reminder time. Please see the DateAdd function in the sample: DateAdd("d", 1, oTask.ReminderTime) adds one day to the current reminder time. For a list of what parameter are possible, please set the cursor on to the function name (DateAdd) and press F1 for the VBA help.

Private Sub Application_Reminder(ByVal Item As Object)
  SendAutoEmail Item
End Sub

Private Sub SendAutoEmail(Item As Object)
  Dim oTask As Outlook.TaskItem
  Dim oMail As Outlook.MailItem
  Dim oFld As Outlook.MAPIFolder
  Dim ReminderSubject As String
  Dim EmailSubject As String
  Dim SendTo As String
  Dim Message As String

  'Task item
  ReminderSubject = "DailyMailReminder"

  'Email
  SendTo = "name@domain.com"
  EmailSubject = "my daily email"
  Message = "this message was sent automatically"

  If TypeOf Item Is Outlook.TaskItem Then
    Set oTask = Item
    If LCase$(oTask.Subject) = LCase$(ReminderSubject) Then

      'Set next reminder
      oTask.ReminderTime = DateAdd("d", 1, oTask.ReminderTime)
      oTask.Save

      'Create email
      Set oMail = Application.CreateItem(olMailItem)
      oMail.Subject = EmailSubject
      oMail.Body = Message
      oMail.Recipients.Add SendTo
      oMail.Recipients.ResolveAll
      oMail.Send
    End If
  End If
End Sub
 
 

ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the ... [more]

 

Access the master category list in the blink of an eye, share your categories in a network, get a reminder service, and ... [more]

 

SAM automatically sets the sender, signature, and folder for sent items, for instance based on the recipient ... [more]

 

OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or ... [more]