OOM & VBA : How to delete Outlook recurring Task items (whose status marked as Completed)


                    Le Café Central de
Deva              

                                 
                                 ..... Deva blogs!!




 

 

OOM & VBA : How to delete Outlook recurring Task items (whose status marked as Completed)

Rate This
  • Comments 2
'[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
....
Page 1 of 1 (2 items)
Blog - Post Feedback Form(CAPTCHA)
Leave a Comment
  • Post