How to Quickly Group Tasks by Recurrence Pattern in Your Outlook

By default, Outlook doesn’t provide a direct feature to group tasks by recurrence pattern. Therefore, in this article, we will show a method to get it.

By default, about task recurrence, Outlook only offers a “Recurring” field. In this case, if you group tasks by “Recurring”, there will be only two groups. One is the “Recurring: Yes”, and the other is “Recurring: No”. However, most of time, users exactly hope to group items by recurrence pattern, such as “Weekly”, “Monthly”, “Yearly”, etc. Under this circumstance, you have to firstly create such a field. Now, in the followings, we will teach you to create it and expose the detailed steps to group tasks by the new field.

Quickly Group Tasks by Recurrence Pattern

  1. First off, trigger Outlook VBA editor via “Alt + F11”.
  2. Then, put the following code into an unused module.
Sub ShowRecurrencePattern_TaskList()
    Dim objTaskFolder As Outlook.Folder
    Dim objRecurringTask As Outlook.TaskItem
    Dim objItem As Object
    Dim objRecurrencePattern As Outlook.RecurrencePattern
    Dim strPattern As String
    Dim objNewProperty As Outlook.UserProperty
 
    'Get the default Tasks folder
    Set objTaskFolder = Outlook.Application.Session.GetDefaultFolder(olFolderTasks)
 
    For Each objItem In objTaskFolder.Items
        'Create a new property called "TaskRecurrence"
        Set objNewProperty = objItem.UserProperties.Find("TaskRecurrence", True)
        If objNewProperty Is Nothing Then
           Set objNewProperty = objItem.UserProperties.Add("TaskRecurrence", olText, True)
        End If
 
        'Input the value to the new property
        If objItem.IsRecurring = True Then
           Set objRecurringTask = objItem
           Set objRecurrencePattern = objRecurringTask.GetRecurrencePattern
   
           Select Case objRecurrencePattern.RecurrenceType
                  Case olRecursDaily
                       strPattern = "Daily"
                  Case olRecursWeekly
                       strPattern = "Weekly"
                  Case olRecursMonthly, olRecursMonthNth
                       strPattern = "Monthly"
                  Case olRecursYearly, olRecursYearNth
                       strPattern = "Yearly"
           End Select
 
           objNewProperty.Value = strPattern
        Else
           strPattern = "(none)"
           objNewProperty.Value = strPattern
        End If
 
        objItem.Save
    Next
End Sub

VBA Code - Create Task Recurrence Pattern Field

  1. Next, press “F5” key button to run this macro.
  2. After that, go to the default Task folder in your Outlook.
  3. Later, switch to “View” tab and click “View Settings” button.
  4. In the popup dialog box, click “Group By” button.Group By
  5. Then, in the new dialog, select “User-defined fields in folder” from the drop down list of “Select available fields from” at the bottom.
  6. Subsequently, choose “TaskRecurrence” from the list of “Group Items by”.Group Items by TaskRecurrence
  7. Eventually, click a series of “OK” to save the view settings.
  8. After returning to the task list, you can see all the tasks have been grouped by the recurrence pattern, as shown in the figure below.Tasks Are Grouped by Recurrence Pattern

Fix Compromised Outlook File

In the event of Outlook corruption, if you do not get hold of a valid and updated Outlook backup, you have to attempt file repair. In general, you can firstly try the inbox repair tool. If it fails, you can fall back on a more specialized external utility, like DataNumen Outlook Repair, which has earned a lot of kudos for its high PST recovery rate.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including corrupt sql and outlook repair software products. For more information visit www.datanumen.com

Comments are closed.