Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listing the ToDo folder from Outlook

Status
Not open for further replies.

BomberMan2K

Programmer
Sep 19, 2007
36
IL
Hey,
I'm trying to list the To-Do Folder in Outlook into a ListBox in C# WinForm. I'm using the default folder olFolderToDo, but can't cast the items in it to a suitable cast.
When I use the Tasks Folder, I cast into Microsoft.Office.Interop.Outlook._TaskItem, but it doesn't work in the ToDo folder and I can't find anything that would.

Would like to receive some hint :)

Thanks and a great day,
Roman
 
BomberMan2K,

Can you post your code?

What is not working? the assignment? or something else?

First thoughts are the listbox needs to know what text to display in the list, the listbox checks the DisplayMember property to see if that is set to the name of a property from the assigned object (when using a Datasource) or Listbox calls .ToString method of the assigned object. You could try setting DisplayMemeber to "Subject"

the TaskItem doesnt have .ToString, so maybe there's the problem. Maybe casting to Object will give this.

Lee.

itlee. MCP\Analyst\Programmer\SQL\.NET\VB\C#
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top