[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
'/ must have reference to Outlook, useful for intellisense during development
'/ should change to Late Binding if you're deploying to others
Dim olk As New Outlook.Application
Dim olns As Outlook.NameSpace
Dim tsk_fld As Outlook.MAPIFolder
Dim tsk_itm As Outlook.TaskItem
Dim olk_itms As Outlook.Items
'/ open the outlook connection
Set olns = olk.GetNamespace("MAPI")
'/ get the Tasks folder
Set tsk_fld = olns.GetDefaultFolder(olFolderTasks)
'/ Get the Items in the Tasks Folder
Set olk_itms = tsk_fld.Items
'/ loop through the tasks
For Each tsk_itm In tsk_fld.Items
'/ only get those that are not complete
If Not tsk_itm.Complete Then
MsgBox .Subject & " - " & .ActualWork & " - " & .Categories
Set olk_itms = Nothing
Set tsk_fld = Nothing
Set olns = Nothing
Open in new window
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.