Content
OLKeeper | |
OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or e-mails. |
This sample sends every email on the evening of the same day at six o'clock.
It is necessary for this sample, as well as for the other following samples, that Outlook is still running when the email should be sent.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim Mail As Outlook.MailItem If TypeOf Item Is Outlook.MailItem Then Set Mail = Item Mail.DeferredDeliveryTime = Date & " 06:00 PM" End If End Sub
This sample sends every email with a certain subject the next Monday at 8 o'clock in the morning.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim Mail As Outlook.MailItem If TypeOf Item Is Outlook.MailItem Then Set Mail = Item If Mail.Subject = "sample" Then Mail.DeferredDeliveryTime = GetNextWeekday(vbMonday) & " 08:00 AM" End If End If End Sub Private Function GetNextWeekday(ByVal DayOfWeek As VbDayOfWeek) As Date Dim diff As Long diff = DayOfWeek - Weekday(Date, vbSunday) If diff > 0 Then GetNextWeekday = DateAdd("d", diff, Date) Else GetNextWeekday = DateAdd("d", 7 + diff, Date) End If End Function
ReplyAll | |
ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the e-mail. |
This sample sends every email with a certain category assigned in the morning of the next business day. So if you click on Send on a Friday, the email will be sent the next Monday.
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) Dim Mail As Outlook.MailItem If TypeOf Item Is Outlook.MailItem Then Set Mail = Item If Mail.Categories = "sample" Then Mail.DeferredDeliveryTime = GetNextWorkday(1) & " 08:00 AM" End If End If End Sub Private Function GetNextWorkday(ByVal MinDaysOffset As Long) As Date Dim d As Date d = DateAdd("d", MinDaysOffset, Date) Select Case Weekday(d, vbMonday) Case 6: d = DateAdd("d", 2, d) Case 7: d = DateAdd("d", 1, d) End Select GetNextWorkday = d End Function
Reporter | |
VBOffice Reporter is an easy to use tool for data analysis and reporting in Outlook. A single click, for instance, allows you to see the number of hours planned for meetings the next month. |