OOM & VBA : How to delete Outlook recurring Task items (whose status marked as Completed)
'[VBA & Outlook Object Model : Code snippet to delete Outlook recurring Task items (whose status marked as Completed)]
'Declaration part
...
dim otaskitem as Outlook.Taskitem
dim ofolder as Outlook.Folder
'Get the Task items
set ofolder = Application.Session.GetDefaultFolder(olFolderTasks)
For each item in ofolder.items
set otaskitem = Item
'Check the status of the specific Taskitem is "Completed" or not
if otaskitem.Status = olTaskcomplete then
'Msgbox "Completed Tasks"
otaskitem.Delete
else
'Msgbox "Not Completed Tasks"
end if
Next
....