views:

307

answers:

2

Hi, I've looked all over the internet and could not find an answer for this one...

Basically, what I want to do is to retrieve all the TaskItems from all the Tasks folders and put them into one single Outlook.Items list. I know how to look at all the folders and how to retrieve the tasks from these folders, but i don't know how to put together all the tasks I retrieve.

So, I have some Outlook.Items that i get from a folder like this:

Outlook.MAPIFolder outlookTasksFolder = Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderTasks);
        Outlook.Items outItems = outlookTasksFolder.Items;

Then, I'd like to add a TaskItem to outItems.

Anyone knows how to do that? Thank you

A: 

there is an Add method on the Items collection outItems.Add(TaskItem) will do the trick.

76mel

76mel
A: 

As 76mel said create a new folder and use the Items.Add method to add all of the tasks into it.

Anonymous Type