Hello,
I searched the archives and elsewhere with "outlook to-do list items delete", but came back empty handed.
I'm using Outlook 2007, and need to delete items in the To-Do List section that match a given pattern. How do I do this?
I searched the archives and elsewhere with "outlook to-do list items delete", but came back empty handed.
I'm using Outlook 2007, and need to delete items in the To-Do List section that match a given pattern. How do I do this?
import sys
import win32com.client
import re
olFolderTodo = 28
outlook = win32com.client.Dispatch("Outlook.Application")
ns = outlook.GetNamespace("MAPI")
todo_folder = ns.GetDefaultFolder(olFolderTodo)
todo_items = todo_folder.Items
p = re.compile('(https://twitter\.com/.+?)\?.+')
for i in range(0, 0 + len(todo_items)):
item = u'{0}'.format(todo_items[i])
m = p.search(item)
if m:
print(m.group(1))
#HEREThank you.
