Well, if you think, coding that is easier, let´s start
In which manner should the items be selected? You could:
a) select them by mouse,
b) get items by searching for keywords like category or subject (or any
other),
c) handle all folder items.
Ad a) The selection is available via the
Application.ActiveExplorer.Selection collection which you can loop
through.
Ad b) The most properties you can look for with the
Application.ActiveExplorer.CurrentFolder.Items.Restrict function. The
function returns an Items collection which you can loop through. Please
select the Restrict method in the object browser (F2) and press F1 for
help. The syntax for the filter is explained and also the properties you
can´t use. In this cases you need to loop through all folder items and
check item by item for the keywords.
ad c) Loop through the Application.ActiveExplorer.CurrentFolder.Items
collection and handle all items.
Sample for a loop through a collection:
Dim AnyObj as Object
Dim AnyCollection As Outlook.Items ' (for b, c) or: As Outlook.Selection
(for a)
Dim oTask As Outlook.TaskItem
' ad a)
Set AnyCollection = Application.ActiveExplorer.Selection
For Each AnyObj in AnyCollection
' check the type of AnyObj
If TypeOf AnyObj Is Outlook.TaskItem Then
Set oTask = AnyObj
' Handle the TaskItem. Using oTask instead of AnyObj is faster
and _
you can benefit from IntelliSense
Endif
Next
A new item you can create with Application.CreateItem. If you´ve created
a new AppointmentItem then you can fill it´s properties with some values
from your TaskItem, e.g.:
AppointmentItem.Start = TaskItem.StartDate
After you´ve finished, just call AppointmentItem.Save for storing the
new data permanently.
Ok, now you´ve got some examples and keywords for your search in the
object browser (the beginner´s best friend). Please post again if you
have any more question.