VBOffice

Bulk Edit the Due Date for Multiple Task Items

In this sample we move the due date for several task items at one go.

Last modified: 2013/07/23 | Accessed: 37.823  | #99
◀ Previous sample Next sample ▶
OLKeeper OLKeeper
OLKeeper reliably prevents users from closing their Outlook window and thus possibly missing reminders or e-mails.

This example moves the due date of all selected task items by four weeks. More precisely, we move by 4*7=28 days in order to preserve the original weekday.


tip  How to add macros to Outlook
Public Sub MoveTaskDueDates()
  Dim Exp As Outlook.Explorer
  Dim Sel As Outlook.Selection
  Dim Task As Outlook.TaskItem

  Set Exp = Application.ActiveExplorer
  Set Sel = Exp.Selection
  If Sel.Count Then
    For Each Task In Sel
      Task.DueDate = DateAdd("d", 28, Task.DueDate)
      Task.Save
    Next
  End If
End Sub
ReplyAll ReplyAll
ReplyAll alerts you before unintentionally replying all, or if you are a confidential BCC recipient of the e-mail.
email  Send a message