Chapter 9. Task Folders

If you use Microsoft Outlook, you are familiar with task items. As the name implies, task items store information about tasks—things that you might find on a “to-do” list. Stored information about each task includes the task description and may include other values, such as due date, start date, status, priority, percent complete, date completed, total work, actual work, assigned to, and others. A task may also have rich text and attachments associated with it, just like messages, making it possible to store associated documents within the task itself.

However, now that I’ve built you up, I have to let you down a little. CDO doesn’t provide much support for working with tasks. In fact, the only task-specific functionality that CDO provides is the ability to retrieve the user’s default task folder. In addition, although CDO can create task items, it has no way to create task requests. If you’re writing an application that requires detailed control over task items, think about using the Outlook object model instead of CDO. The Outlook object model is introduced in Appendix B. Having said that, I’ll note that CDO can handle simple processing of task items. Tasks are stored as message items in the message store. Some of the task’s information is stored in standard message properties, which means that CDO’s ability to manipulate message items can be applied to task items.

In this chapter I’ll show you how to create, save, send, move, and delete task items. ...

Get CDO & MAPI Programming with Visual Basic: now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.